Package org.apache.maven.api.model
Class ActivationFile
java.lang.Object
org.apache.maven.api.model.ActivationFile
- All Implemented Interfaces:
Serializable,InputLocationTracker
@Experimental
@Generated
@ThreadSafe
@Immutable
public class ActivationFile
extends Object
implements Serializable, InputLocationTracker
This is the file specification used to activate the profile. The
Variable interpolation for these file specifications is limited to
missing value
is the location of a file that needs to exist, and if it doesn't, the profile will be
activated. On the other hand, exists will test for the existence of the file and if it is
there, the profile will be activated.Variable interpolation for these file specifications is limited to
${basedir},
system properties and user properties.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder class used to create ActivationFile instances. -
Method Summary
Modifier and TypeMethodDescriptionThe name of the file that must exist to activate the profile.getLocation(Object key) Gets the location of the specified field in the input source.The name of the file that must be missing to activate the profile.static ActivationFile.BuilderCreates a newActivationFilebuilder instance.static ActivationFile.BuildernewBuilder(boolean withDefaults) Creates a newActivationFilebuilder instance using default values or not.static ActivationFile.BuildernewBuilder(ActivationFile from) Creates a newActivationFilebuilder instance using the specified object as a basis.static ActivationFile.BuildernewBuilder(ActivationFile from, boolean forceCopy) Creates a newActivationFilebuilder instance using the specified object as a basis.static ActivationFileCreates a newActivationFileinstance.static ActivationFilenewInstance(boolean withDefaults) Creates a newActivationFileinstance using default values or not.with()Creates a new builder with this object as the basis.withExists(String exists) Creates a newActivationFileinstance using the specified exists.withMissing(String missing) Creates a newActivationFileinstance using the specified missing.
-
Method Details
-
getMissing
The name of the file that must be missing to activate the profile.- Returns:
- a
String
-
getExists
The name of the file that must exist to activate the profile.- Returns:
- a
String
-
getLocation
Gets the location of the specified field in the input source.- Specified by:
getLocationin interfaceInputLocationTracker
-
with
Creates a new builder with this object as the basis.- Returns:
- a
Builder
-
withMissing
Creates a newActivationFileinstance using the specified missing.- Parameters:
missing- the newStringto use- Returns:
- a
ActivationFilewith the specified missing
-
withExists
Creates a newActivationFileinstance using the specified exists.- Parameters:
exists- the newStringto use- Returns:
- a
ActivationFilewith the specified exists
-
newInstance
Creates a newActivationFileinstance. Equivalent tonewInstance( true ).- Returns:
- a new
ActivationFile - See Also:
-
newInstance
Creates a newActivationFileinstance using default values or not. Equivalent tonewBuilder( withDefaults ).build().- Parameters:
withDefaults- the boolean indicating whether default values should be used- Returns:
- a new
ActivationFile
-
newBuilder
Creates a newActivationFilebuilder instance. Equivalent tonewBuilder( true ).- Returns:
- a new
Builder - See Also:
-
newBuilder
Creates a newActivationFilebuilder instance using default values or not.- Parameters:
withDefaults- the boolean indicating whether default values should be used- Returns:
- a new
Builder
-
newBuilder
Creates a newActivationFilebuilder instance using the specified object as a basis. Equivalent tonewBuilder( from, false ).- Parameters:
from- theActivationFileinstance to use as a basis- Returns:
- a new
Builder
-
newBuilder
Creates a newActivationFilebuilder instance using the specified object as a basis.- Parameters:
from- theActivationFileinstance to use as a basisforceCopy- the boolean indicating if a copy should be forced- Returns:
- a new
Builder
-