@Experimental @Generated @ThreadSafe @Immutable public class Activation extends Object implements Serializable, InputLocationTracker
| Modifier and Type | Class and Description |
|---|---|
static class |
Activation.Builder
Builder class used to create Activation instances.
|
| Modifier and Type | Method and Description |
|---|---|
ActivationFile |
getFile()
Specifies that this profile will be activated based on existence of a file.
|
String |
getJdk()
Specifies that this profile will be activated when a matching JDK is detected.
|
InputLocation |
getLocation(Object key)
Gets the location of the specified field in the input source.
|
ActivationOS |
getOs()
Specifies that this profile will be activated when matching operating system
attributes are detected.
|
ActivationProperty |
getProperty()
Specifies that this profile will be activated when this system property is
specified.
|
boolean |
isActiveByDefault()
If set to true, this profile will be active unless another profile in this
pom is activated using the command line -P option or by one of that profile's
activators.
|
static Activation.Builder |
newBuilder()
Creates a new
Activation builder instance. |
static Activation.Builder |
newBuilder(Activation from)
Creates a new
Activation builder instance using the specified object as a basis. |
static Activation.Builder |
newBuilder(Activation from,
boolean forceCopy)
Creates a new
Activation builder instance using the specified object as a basis. |
static Activation.Builder |
newBuilder(boolean withDefaults)
Creates a new
Activation builder instance using default values or not. |
static Activation |
newInstance()
Creates a new
Activation instance. |
static Activation |
newInstance(boolean withDefaults)
Creates a new
Activation instance using default values or not. |
Activation.Builder |
with()
Creates a new builder with this object as the basis.
|
Activation |
withActiveByDefault(boolean activeByDefault)
Creates a new
Activation instance using the specified activeByDefault. |
Activation |
withFile(ActivationFile file)
Creates a new
Activation instance using the specified file. |
Activation |
withJdk(String jdk)
Creates a new
Activation instance using the specified jdk. |
Activation |
withOs(ActivationOS os)
Creates a new
Activation instance using the specified os. |
Activation |
withProperty(ActivationProperty property)
Creates a new
Activation instance using the specified property. |
public boolean isActiveByDefault()
booleanpublic String getJdk()
1.4 only activates on JDKs versioned 1.4,
while !1.4 matches any JDK that is not version 1.4. Ranges are supported too:
[1.5,) activates when the JDK is 1.5 minimum.Stringpublic ActivationOS getOs()
ActivationOSpublic ActivationProperty getProperty()
ActivationPropertypublic ActivationFile getFile()
ActivationFilepublic InputLocation getLocation(Object key)
getLocation in interface InputLocationTracker@Nonnull public Activation.Builder with()
Builder@Nonnull public Activation withActiveByDefault(boolean activeByDefault)
Activation instance using the specified activeByDefault.activeByDefault - the new boolean to useActivation with the specified activeByDefault@Nonnull public Activation withJdk(String jdk)
Activation instance using the specified jdk.jdk - the new String to useActivation with the specified jdk@Nonnull public Activation withOs(ActivationOS os)
Activation instance using the specified os.os - the new ActivationOS to useActivation with the specified os@Nonnull public Activation withProperty(ActivationProperty property)
Activation instance using the specified property.property - the new ActivationProperty to useActivation with the specified property@Nonnull public Activation withFile(ActivationFile file)
Activation instance using the specified file.file - the new ActivationFile to useActivation with the specified file@Nonnull public static Activation newInstance()
Activation instance.
Equivalent to newInstance( true ).ActivationnewInstance(boolean)@Nonnull public static Activation newInstance(boolean withDefaults)
Activation instance using default values or not.
Equivalent to newBuilder( withDefaults ).build().withDefaults - the boolean indicating whether default values should be usedActivation@Nonnull public static Activation.Builder newBuilder()
Activation builder instance.
Equivalent to newBuilder( true ).BuildernewBuilder(boolean)@Nonnull public static Activation.Builder newBuilder(boolean withDefaults)
Activation builder instance using default values or not.withDefaults - the boolean indicating whether default values should be usedBuilder@Nonnull public static Activation.Builder newBuilder(Activation from)
Activation builder instance using the specified object as a basis.
Equivalent to newBuilder( from, false ).from - the Activation instance to use as a basisBuilder@Nonnull public static Activation.Builder newBuilder(Activation from, boolean forceCopy)
Activation builder instance using the specified object as a basis.from - the Activation instance to use as a basisforceCopy - the boolean indicating if a copy should be forcedBuilderCopyright © 2001–2022 The Apache Software Foundation. All rights reserved.