@Experimental @Generated @ThreadSafe @Immutable public class ConfigurationContainer extends Object implements Serializable, InputLocationTracker
Modifier and Type | Class and Description |
---|---|
static class |
ConfigurationContainer.Builder
Builder class used to create ConfigurationContainer instances.
|
Modifier and Type | Method and Description |
---|---|
Dom |
getConfiguration()
The configuration as DOM object.
|
String |
getInherited()
Whether any configuration should be propagated to child POMs.
|
InputLocation |
getLocation(Object key)
Gets the location of the specified field in the input source.
|
boolean |
isInherited() |
static ConfigurationContainer.Builder |
newBuilder()
Creates a new
ConfigurationContainer builder instance. |
static ConfigurationContainer.Builder |
newBuilder(boolean withDefaults)
Creates a new
ConfigurationContainer builder instance using default values or not. |
static ConfigurationContainer.Builder |
newBuilder(ConfigurationContainer from)
Creates a new
ConfigurationContainer builder instance using the specified object as a basis. |
static ConfigurationContainer.Builder |
newBuilder(ConfigurationContainer from,
boolean forceCopy)
Creates a new
ConfigurationContainer builder instance using the specified object as a basis. |
static ConfigurationContainer |
newInstance()
Creates a new
ConfigurationContainer instance. |
static ConfigurationContainer |
newInstance(boolean withDefaults)
Creates a new
ConfigurationContainer instance using default values or not. |
ConfigurationContainer.Builder |
with()
Creates a new builder with this object as the basis.
|
ConfigurationContainer |
withConfiguration(Dom configuration)
Creates a new
ConfigurationContainer instance using the specified configuration. |
ConfigurationContainer |
withInherited(String inherited)
Creates a new
ConfigurationContainer instance using the specified inherited. |
public String getInherited()
String
for technical reasons, the semantic type is actually
Boolean
. Default value is true
.String
public Dom getConfiguration()
The configuration as DOM object.
By default, every element content is trimmed, but starting with Maven 3.1.0, you can add
xml:space="preserve"
to elements you want to preserve whitespace.
You can control how child POMs inherit configuration from parent POMs by adding combine.children
or combine.self
attributes to the children of the configuration element:
combine.children
: available values are merge
(default) and append
,combine.self
: available values are merge
(default) and override
.See POM Reference documentation and Xpp3DomUtils for more information.
Dom
public InputLocation getLocation(Object key)
getLocation
in interface InputLocationTracker
@Nonnull public ConfigurationContainer.Builder with()
Builder
@Nonnull public ConfigurationContainer withInherited(String inherited)
ConfigurationContainer
instance using the specified inherited.inherited
- the new String
to useConfigurationContainer
with the specified inherited@Nonnull public ConfigurationContainer withConfiguration(Dom configuration)
ConfigurationContainer
instance using the specified configuration.configuration
- the new Dom
to useConfigurationContainer
with the specified configuration@Nonnull public static ConfigurationContainer newInstance()
ConfigurationContainer
instance.
Equivalent to newInstance( true )
.ConfigurationContainer
newInstance(boolean)
@Nonnull public static ConfigurationContainer newInstance(boolean withDefaults)
ConfigurationContainer
instance using default values or not.
Equivalent to newBuilder( withDefaults ).build()
.withDefaults
- the boolean indicating whether default values should be usedConfigurationContainer
@Nonnull public static ConfigurationContainer.Builder newBuilder()
ConfigurationContainer
builder instance.
Equivalent to newBuilder( true )
.Builder
newBuilder(boolean)
@Nonnull public static ConfigurationContainer.Builder newBuilder(boolean withDefaults)
ConfigurationContainer
builder instance using default values or not.withDefaults
- the boolean indicating whether default values should be usedBuilder
@Nonnull public static ConfigurationContainer.Builder newBuilder(ConfigurationContainer from)
ConfigurationContainer
builder instance using the specified object as a basis.
Equivalent to newBuilder( from, false )
.from
- the ConfigurationContainer
instance to use as a basisBuilder
@Nonnull public static ConfigurationContainer.Builder newBuilder(ConfigurationContainer from, boolean forceCopy)
ConfigurationContainer
builder instance using the specified object as a basis.from
- the ConfigurationContainer
instance to use as a basisforceCopy
- the boolean indicating if a copy should be forcedBuilder
public boolean isInherited()
Copyright © 2001–2022 The Apache Software Foundation. All rights reserved.