Class ActivationFile

java.lang.Object
org.apache.maven.api.settings.ActivationFile
All Implemented Interfaces:
Serializable, InputLocationTracker

This is the file specification used to activate a profile. The missing value will be a the location of a file that needs to exist, and if it doesn't the profile must run. On the other hand exists will test for the existence of the file and if it is there will run the profile.
See Also:
  • Method Details

    • getMissing

      public String getMissing()
      The name of the file that should be missing to activate a profile.
      Returns:
      a String
    • getExists

      public String getExists()
      The name of the file that should exist to activate a profile.
      Returns:
      a String
    • 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
    • withMissing

      @Nonnull public ActivationFile withMissing(String missing)
      Creates a new ActivationFile instance using the specified missing.
      Parameters:
      missing - the new String to use
      Returns:
      a ActivationFile with the specified missing
    • withExists

      @Nonnull public ActivationFile withExists(String exists)
      Creates a new ActivationFile instance using the specified exists.
      Parameters:
      exists - the new String to use
      Returns:
      a ActivationFile with the specified exists
    • newInstance

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

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

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

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

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