Class PersistedToolchains

java.lang.Object
org.apache.maven.api.toolchain.TrackableBase
org.apache.maven.api.toolchain.PersistedToolchains
All Implemented Interfaces:
Serializable

@Experimental @Generated @ThreadSafe @Immutable public class PersistedToolchains extends TrackableBase implements Serializable
The <toolchains> element is the root of the descriptor. The following table lists all of the possible child elements.
See Also:
  • Method Details

    • getModelEncoding

      public String getModelEncoding()
    • getToolchains

      @Nonnull public List<ToolchainModel> getToolchains()
      The toolchain instance definition.
      Returns:
      a List<ToolchainModel>
    • with

      @Nonnull public PersistedToolchains.Builder with()
      Creates a new builder with this object as the basis.
      Overrides:
      with in class TrackableBase
      Returns:
      a Builder
    • withToolchains

      @Nonnull public PersistedToolchains withToolchains(Collection<ToolchainModel> toolchains)
      Creates a new PersistedToolchains instance using the specified toolchains.
      Parameters:
      toolchains - the new Collection<ToolchainModel> to use
      Returns:
      a PersistedToolchains with the specified toolchains
    • newInstance

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

      @Nonnull public static PersistedToolchains newInstance(boolean withDefaults)
      Creates a new PersistedToolchains 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 PersistedToolchains
    • newBuilder

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

      @Nonnull public static PersistedToolchains.Builder newBuilder(boolean withDefaults)
      Creates a new PersistedToolchains 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 PersistedToolchains.Builder newBuilder(PersistedToolchains from)
      Creates a new PersistedToolchains builder instance using the specified object as a basis. Equivalent to newBuilder(from, false).
      Parameters:
      from - the PersistedToolchains instance to use as a basis
      Returns:
      a new Builder
    • newBuilder

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