|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.plexus.configuration.DefaultPlexusConfiguration
public class DefaultPlexusConfiguration
Constructor Summary | |
---|---|
protected |
DefaultPlexusConfiguration()
|
protected |
DefaultPlexusConfiguration(java.lang.String name)
|
protected |
DefaultPlexusConfiguration(java.lang.String name,
java.lang.String value)
|
Method Summary | |
---|---|
void |
addChild(PlexusConfiguration child)
Adds a configuration under this configuration, which acts as a parent. |
PlexusConfiguration |
addChild(java.lang.String name)
Add a child element with a given name and return the newly created element. |
PlexusConfiguration |
addChild(java.lang.String name,
java.lang.String value)
Add a child element with a given name, and given value and return the newly created element. |
java.lang.String |
getAttribute(java.lang.String name)
Returns the value of the named attribute. |
java.lang.String |
getAttribute(java.lang.String name,
java.lang.String defaultValue)
Returns the value of the named attribute, or default if one cannot be found. |
java.lang.String[] |
getAttributeNames()
Returns an array of attribute names. |
PlexusConfiguration |
getChild(int i)
Returns the child configuration at the given location. |
PlexusConfiguration |
getChild(java.lang.String name)
Returns the child configuration of the given name. |
PlexusConfiguration |
getChild(java.lang.String name,
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(java.lang.String name)
Returns an array of all child configurations with the given name. |
java.lang.String |
getName()
Returns the name of this configuration. |
java.lang.String |
getValue()
Returns the value of this configuration. |
java.lang.String |
getValue(java.lang.String defaultValue)
Returns the value of this configuration, or default if one cannot be found. |
void |
setAttribute(java.lang.String name,
java.lang.String value)
Sets an attribute on this configuration. |
void |
setName(java.lang.String name)
Sets the name of this configuration. |
void |
setValue(java.lang.String val)
Set the value of a configuration element. |
PlexusConfiguration |
setValueAndGetSelf(java.lang.String val)
Set the value of a configuration element and return the PlexusConfiguration object so that further operations can be carried out. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected DefaultPlexusConfiguration()
protected DefaultPlexusConfiguration(java.lang.String name)
protected DefaultPlexusConfiguration(java.lang.String name, java.lang.String value)
Method Detail |
---|
public java.lang.String getName()
PlexusConfiguration
getName
in interface PlexusConfiguration
public void setName(java.lang.String name)
PlexusConfiguration
setName
in interface PlexusConfiguration
public java.lang.String getValue()
PlexusConfiguration
getValue
in interface PlexusConfiguration
public java.lang.String getValue(java.lang.String defaultValue)
PlexusConfiguration
getValue
in interface PlexusConfiguration
defaultValue
- value to return if none is found
public void setValue(java.lang.String val)
PlexusConfiguration
setValue
in interface PlexusConfiguration
public PlexusConfiguration setValueAndGetSelf(java.lang.String val)
PlexusConfiguration
setValueAndGetSelf
in interface PlexusConfiguration
public void setAttribute(java.lang.String name, java.lang.String value)
PlexusConfiguration
setAttribute
in interface PlexusConfiguration
public java.lang.String getAttribute(java.lang.String name)
PlexusConfiguration
getAttribute
in interface PlexusConfiguration
public java.lang.String getAttribute(java.lang.String name, java.lang.String defaultValue)
PlexusConfiguration
getAttribute
in interface PlexusConfiguration
defaultValue
- value to return if none is found
public java.lang.String[] getAttributeNames()
PlexusConfiguration
getAttributeNames
in interface PlexusConfiguration
public PlexusConfiguration getChild(java.lang.String name)
PlexusConfiguration
getChild
in interface PlexusConfiguration
name
- the name of the child to return
public PlexusConfiguration getChild(int i)
PlexusConfiguration
getChild
in interface PlexusConfiguration
i
- the position of the child under this configuration
public PlexusConfiguration getChild(java.lang.String name, boolean createChild)
PlexusConfiguration
getChild
in interface PlexusConfiguration
name
- the name of the child to returncreateChild
- true if a new child should be create, if none found
public PlexusConfiguration[] getChildren()
PlexusConfiguration
getChildren
in interface PlexusConfiguration
public PlexusConfiguration[] getChildren(java.lang.String name)
PlexusConfiguration
getChildren
in interface PlexusConfiguration
name
- the name of the children configurations to return
public void addChild(PlexusConfiguration child)
PlexusConfiguration
addChild
in interface PlexusConfiguration
child
- the child configuration to addpublic PlexusConfiguration addChild(java.lang.String name)
PlexusConfiguration
addChild
in interface PlexusConfiguration
public PlexusConfiguration addChild(java.lang.String name, java.lang.String value)
PlexusConfiguration
addChild
in interface PlexusConfiguration
public int getChildCount()
PlexusConfiguration
getChildCount
in interface PlexusConfiguration
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |