public interface PlexusConfiguration
Modifier and Type | Method and Description |
---|---|
void |
addChild(PlexusConfiguration configuration)
Adds a configuration under this configuration, which acts as
a parent.
|
PlexusConfiguration |
addChild(String name)
Add a child element with a given name and return the newly created element.
|
PlexusConfiguration |
addChild(String name,
String value)
Add a child element with a given name, and given value and return the
newly created element.
|
String |
getAttribute(String paramName)
Returns the value of the named attribute.
|
String |
getAttribute(String name,
String defaultValue)
Returns the value of the named attribute, or default if one cannot be
found.
|
String[] |
getAttributeNames()
Returns an array of attribute names.
|
PlexusConfiguration |
getChild(int i)
Returns the child configuration at the given location.
|
PlexusConfiguration |
getChild(String child)
Returns the child configuration of the given name.
|
PlexusConfiguration |
getChild(String child,
boolean createChild)
Returns the child configuration of the given name.
|
int |
getChildCount()
Returns the number of directly children under this configuration.
|
PlexusConfiguration[] |
getChildren()
Returns an array of all child configurations.
|
PlexusConfiguration[] |
getChildren(String name)
Returns an array of all child configurations with the given name.
|
String |
getName()
Returns the name of this configuration.
|
String |
getValue()
Returns the value of this configuration.
|
String |
getValue(String defaultValue)
Returns the value of this configuration, or default if one cannot be
found.
|
void |
setAttribute(String name,
String value)
Sets an attribute on this configuration.
|
void |
setName(String name)
Sets the name of this configuration.
|
void |
setValue(String value)
Set the value of a configuration element.
|
PlexusConfiguration |
setValueAndGetSelf(String value)
Set the value of a configuration element and return the PlexusConfiguration object
so that further operations can be carried out.
|
String getName()
void setName(String name)
name
- The name of the configuration.String getValue() throws PlexusConfigurationException
PlexusConfigurationException
- in case of an error.String getValue(String defaultValue)
defaultValue
- value to return if none is foundvoid setValue(String value)
value
- The value of the configuration element.PlexusConfiguration setValueAndGetSelf(String value)
value
- set the value.PlexusConfiguration
void setAttribute(String name, String value)
name
- name of the attributevalue
- the value of the attribute.String[] getAttributeNames()
String getAttribute(String paramName) throws PlexusConfigurationException
paramName
- The name of the attribute.PlexusConfigurationException
- in case of an error.String getAttribute(String name, String defaultValue)
name
- The name of the attribute.defaultValue
- value to return if none is foundPlexusConfiguration getChild(String child)
child
- the name of the child to returnPlexusConfiguration getChild(int i)
i
- the position of the child under this configurationPlexusConfiguration getChild(String child, boolean createChild)
child
- the name of the child to returncreateChild
- true if a new child should be create, if none foundPlexusConfiguration[] getChildren()
PlexusConfiguration[] getChildren(String name)
name
- the name of the children configurations to returnvoid addChild(PlexusConfiguration configuration)
configuration
- the child configuration to addPlexusConfiguration addChild(String name)
name
- The name of the element.PlexusConfiguration
PlexusConfiguration addChild(String name, String value)
name
- The name of the child element.value
- The value of the child element.PlexusConfiguration
int getChildCount()
Copyright © 2001–2019 Codehaus Plexus. All rights reserved.