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
Modifier and TypeClassDescriptionstatic class
Builder class used to create TrackableBase instances. -
Constructor Summary
ModifierConstructorDescriptionprotected
TrackableBase
(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.Builder
Creates a newTrackableBase
builder instance.static TrackableBase.Builder
newBuilder
(boolean withDefaults) Creates a newTrackableBase
builder instance using default values or not.static TrackableBase.Builder
newBuilder
(TrackableBase from) Creates a newTrackableBase
builder instance using the specified object as a basis.static TrackableBase.Builder
newBuilder
(TrackableBase from, boolean forceCopy) Creates a newTrackableBase
builder instance using the specified object as a basis.static TrackableBase
Creates a newTrackableBase
instance.static TrackableBase
newInstance
(boolean withDefaults) Creates a newTrackableBase
instance 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:
getLocation
in 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 newTrackableBase
instance. Equivalent tonewInstance(true)
.- Returns:
- a new
TrackableBase
- See Also:
-
newInstance
Creates a newTrackableBase
instance 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 newTrackableBase
builder instance. Equivalent tonewBuilder(true)
.- Returns:
- a new
Builder
- See Also:
-
newBuilder
Creates a newTrackableBase
builder instance using default values or not.- Parameters:
withDefaults
- the boolean indicating whether default values should be used- Returns:
- a new
Builder
-
newBuilder
Creates a newTrackableBase
builder instance using the specified object as a basis. Equivalent tonewBuilder(from, false)
.- Parameters:
from
- theTrackableBase
instance to use as a basis- Returns:
- a new
Builder
-
newBuilder
Creates a newTrackableBase
builder instance using the specified object as a basis.- Parameters:
from
- theTrackableBase
instance to use as a basisforceCopy
- the boolean indicating if a copy should be forced- Returns:
- a new
Builder
-