Package org.apache.maven.api.toolchain
Class TrackableBase
java.lang.Object
org.apache.maven.api.toolchain.TrackableBase
- All Implemented Interfaces:
Serializable,InputLocationTracker
- Direct Known Subclasses:
PersistedToolchains,ToolchainModel
@Experimental
@Generated
@ThreadSafe
@Immutable
public class TrackableBase
extends Object
implements Serializable, InputLocationTracker
Common base class that contains code to track the source for this instance.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder class used to create TrackableBase instances. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedTrackableBase(TrackableBase.Builder builder) Constructor for this class, to be called from its subclasses andTrackableBase.Builder. -
Method Summary
Modifier and TypeMethodDescriptionGets the input location that caused this model to be read.getLocation(Object key) Gets the location of the specified field in the input source.Gets the keys of the locations of the input source.static TrackableBase.BuilderCreates a newTrackableBasebuilder instance.static TrackableBase.BuildernewBuilder(boolean withDefaults) Creates a newTrackableBasebuilder instance using default values or not.static TrackableBase.BuildernewBuilder(TrackableBase from) Creates a newTrackableBasebuilder instance using the specified object as a basis.static TrackableBase.BuildernewBuilder(TrackableBase from, boolean forceCopy) Creates a newTrackableBasebuilder instance using the specified object as a basis.static TrackableBaseCreates a newTrackableBaseinstance.static TrackableBasenewInstance(boolean withDefaults) Creates a newTrackableBaseinstance using default values or not.with()Creates a new builder with this object as the basis.
-
Constructor Details
-
TrackableBase
Constructor for this class, to be called from its subclasses andTrackableBase.Builder.- See Also:
-
-
Method Details
-
getLocation
Gets the location of the specified field in the input source.- Specified by:
getLocationin interfaceInputLocationTracker
-
getLocationKeys
Gets the keys of the locations of the input source. -
getImportedFrom
Gets the input location that caused this model to be read. -
with
Creates a new builder with this object as the basis.- Returns:
- a
Builder
-
newInstance
Creates a newTrackableBaseinstance. Equivalent tonewInstance(true).- Returns:
- a new
TrackableBase - See Also:
-
newInstance
Creates a newTrackableBaseinstance using default values or not. Equivalent tonewBuilder(withDefaults).build().- Parameters:
withDefaults- the boolean indicating whether default values should be used- Returns:
- a new
TrackableBase
-
newBuilder
Creates a newTrackableBasebuilder instance. Equivalent tonewBuilder(true).- Returns:
- a new
Builder - See Also:
-
newBuilder
Creates a newTrackableBasebuilder instance using default values or not.- Parameters:
withDefaults- the boolean indicating whether default values should be used- Returns:
- a new
Builder
-
newBuilder
Creates a newTrackableBasebuilder instance using the specified object as a basis. Equivalent tonewBuilder(from, false).- Parameters:
from- theTrackableBaseinstance to use as a basis- Returns:
- a new
Builder
-
newBuilder
Creates a newTrackableBasebuilder instance using the specified object as a basis.- Parameters:
from- theTrackableBaseinstance to use as a basisforceCopy- the boolean indicating if a copy should be forced- Returns:
- a new
Builder
-