Class DefaultPlexusConfiguration
java.lang.Object
org.codehaus.plexus.configuration.DefaultPlexusConfiguration
- All Implemented Interfaces:
PlexusConfiguration
- Direct Known Subclasses:
XmlPlexusConfiguration
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedprotectedDefaultPlexusConfiguration(String name, String value) -
Method Summary
Modifier and TypeMethodDescriptionAdd a child element with a given name and return the newly created element.Add a child element with a given name, and given value and return the newly created element.voidaddChild(PlexusConfiguration child) Adds a configuration under this configuration, which acts as a parent.getAttribute(String name) Returns the value of the named attribute.getAttribute(String name, String defaultValue) Returns the value of the named attribute, or default if one cannot be found.String[]Returns an array of attribute names.getChild(int i) Returns the child configuration at the given location.Returns the child configuration of the given name.Returns the child configuration of the given name.intReturns the number of directly children under this configuration.Returns an array of all child configurations.getChildren(String name) Returns an array of all child configurations with the given name.getName()Returns the name of this configuration.getValue()Returns the value of this configuration.Returns the value of this configuration, or default if one cannot be found.voidsetAttribute(String name, String value) Sets an attribute on this configuration.voidSets the name of this configuration.voidSet the value of a configuration element.setValueAndGetSelf(String val) Set the value of a configuration element and return the PlexusConfiguration object so that further operations can be carried out.
-
Constructor Details
-
DefaultPlexusConfiguration
protected DefaultPlexusConfiguration() -
DefaultPlexusConfiguration
-
DefaultPlexusConfiguration
-
-
Method Details
-
getName
Description copied from interface:PlexusConfigurationReturns the name of this configuration.- Specified by:
getNamein interfacePlexusConfiguration- Returns:
- the name of this configuration
-
setName
Description copied from interface:PlexusConfigurationSets the name of this configuration.- Specified by:
setNamein interfacePlexusConfiguration- Parameters:
name- The name of the configuration.
-
getValue
Description copied from interface:PlexusConfigurationReturns the value of this configuration.- Specified by:
getValuein interfacePlexusConfiguration- Returns:
- the value of this configuration
-
getValue
Description copied from interface:PlexusConfigurationReturns the value of this configuration, or default if one cannot be found.- Specified by:
getValuein interfacePlexusConfiguration- Parameters:
defaultValue- value to return if none is found- Returns:
- the value of this configuration
-
setValue
Description copied from interface:PlexusConfigurationSet the value of a configuration element.- Specified by:
setValuein interfacePlexusConfiguration- Parameters:
val- The value of the configuration element.
-
setValueAndGetSelf
Description copied from interface:PlexusConfigurationSet the value of a configuration element and return the PlexusConfiguration object so that further operations can be carried out.- Specified by:
setValueAndGetSelfin interfacePlexusConfiguration- Parameters:
val- set the value.- Returns:
PlexusConfiguration
-
setAttribute
Description copied from interface:PlexusConfigurationSets an attribute on this configuration.- Specified by:
setAttributein interfacePlexusConfiguration- Parameters:
name- name of the attributevalue- the value of the attribute.
-
getAttribute
Description copied from interface:PlexusConfigurationReturns the value of the named attribute.- Specified by:
getAttributein interfacePlexusConfiguration- Parameters:
name- The name of the attribute.- Returns:
- the value of the named attribute
-
getAttribute
Description copied from interface:PlexusConfigurationReturns the value of the named attribute, or default if one cannot be found.- Specified by:
getAttributein interfacePlexusConfiguration- Parameters:
name- The name of the attribute.defaultValue- value to return if none is found- Returns:
- the value of the named attribute
-
getAttributeNames
Description copied from interface:PlexusConfigurationReturns an array of attribute names.- Specified by:
getAttributeNamesin interfacePlexusConfiguration- Returns:
- an array of attribute names
-
getChild
Description copied from interface:PlexusConfigurationReturns the child configuration of the given name.- Specified by:
getChildin interfacePlexusConfiguration- Parameters:
name- the name of the child to return- Returns:
- the child configuration of the given name
-
getChild
Description copied from interface:PlexusConfigurationReturns the child configuration at the given location.- Specified by:
getChildin interfacePlexusConfiguration- Parameters:
i- the position of the child under this configuration- Returns:
- the child configuration at the given location
-
getChild
Description copied from interface:PlexusConfigurationReturns the child configuration of the given name.- Specified by:
getChildin interfacePlexusConfiguration- Parameters:
name- the name of the child to returncreateChild- true if a new child should be create, if none found- Returns:
- the child configuration of the given name, or new child if created
-
getChildren
Description copied from interface:PlexusConfigurationReturns an array of all child configurations.- Specified by:
getChildrenin interfacePlexusConfiguration- Returns:
- an array of all child configurations
-
getChildren
Description copied from interface:PlexusConfigurationReturns an array of all child configurations with the given name.- Specified by:
getChildrenin interfacePlexusConfiguration- Parameters:
name- the name of the children configurations to return- Returns:
- an array of all child configurations with the given name
-
addChild
Description copied from interface:PlexusConfigurationAdds a configuration under this configuration, which acts as a parent.- Specified by:
addChildin interfacePlexusConfiguration- Parameters:
child- the child configuration to add
-
addChild
Description copied from interface:PlexusConfigurationAdd a child element with a given name and return the newly created element.- Specified by:
addChildin interfacePlexusConfiguration- Parameters:
name- The name of the element.- Returns:
PlexusConfiguration
-
addChild
Description copied from interface:PlexusConfigurationAdd a child element with a given name, and given value and return the newly created element.- Specified by:
addChildin interfacePlexusConfiguration- Parameters:
name- The name of the child element.value- The value of the child element.- Returns:
PlexusConfiguration
-
getChildCount
public int getChildCount()Description copied from interface:PlexusConfigurationReturns the number of directly children under this configuration.- Specified by:
getChildCountin interfacePlexusConfiguration- Returns:
- the number of directly children under this configuration.
-