Class TrackableBase

java.lang.Object
org.apache.maven.api.toolchain.TrackableBase
All Implemented Interfaces:
Serializable, InputLocationTracker
Direct Known Subclasses:
PersistedToolchains, ToolchainModel

Common base class that contains code to track the source for this instance (USER|GLOBAL)
See Also:
  • Method Details

    • getLocation

      public InputLocation getLocation(Object key)
      Gets the location of the specified field in the input source.
      Specified by:
      getLocation in interface InputLocationTracker
    • with

      Creates a new builder with this object as the basis.
      Returns:
      a Builder
    • newInstance

      @Nonnull public static TrackableBase newInstance()
      Creates a new TrackableBase instance. Equivalent to newInstance(true).
      Returns:
      a new TrackableBase
      See Also:
    • newInstance

      @Nonnull public static TrackableBase newInstance(boolean withDefaults)
      Creates a new TrackableBase instance using default values or not. Equivalent to newBuilder(withDefaults).build().
      Parameters:
      withDefaults - the boolean indicating whether default values should be used
      Returns:
      a new TrackableBase
    • newBuilder

      @Nonnull public static TrackableBase.Builder newBuilder()
      Creates a new TrackableBase builder instance. Equivalent to newBuilder(true).
      Returns:
      a new Builder
      See Also:
    • newBuilder

      @Nonnull public static TrackableBase.Builder newBuilder(boolean withDefaults)
      Creates a new TrackableBase builder instance using default values or not.
      Parameters:
      withDefaults - the boolean indicating whether default values should be used
      Returns:
      a new Builder
    • newBuilder

      @Nonnull public static TrackableBase.Builder newBuilder(TrackableBase from)
      Creates a new TrackableBase builder instance using the specified object as a basis. Equivalent to newBuilder(from, false).
      Parameters:
      from - the TrackableBase instance to use as a basis
      Returns:
      a new Builder
    • newBuilder

      @Nonnull public static TrackableBase.Builder newBuilder(TrackableBase from, boolean forceCopy)
      Creates a new TrackableBase builder instance using the specified object as a basis.
      Parameters:
      from - the TrackableBase instance to use as a basis
      forceCopy - the boolean indicating if a copy should be forced
      Returns:
      a new Builder