org.codehaus.plexus.configuration
Class DefaultPlexusConfiguration

java.lang.Object
  extended byorg.codehaus.plexus.configuration.DefaultPlexusConfiguration
All Implemented Interfaces:
PlexusConfiguration
Direct Known Subclasses:
PropertiesPlexusConfiguration, PropertiesPlexusConfiguration.ValueConfiguration

public class DefaultPlexusConfiguration
extends java.lang.Object
implements PlexusConfiguration


Field Summary
private  java.util.Map attributes
           
private  java.util.List children
           
private  java.lang.String name
           
private  PlexusConfiguration parent
           
private  java.lang.String value
           
 
Constructor Summary
DefaultPlexusConfiguration(java.lang.String name)
           
 
Method Summary
 void addAll(PlexusConfiguration other)
           
 void addAllAttributes(PlexusConfiguration other)
           
 void addAllChildren(PlexusConfiguration other)
           
 void addChild(PlexusConfiguration configuration)
           
 java.lang.String getAttribute(java.lang.String name)
           
 java.lang.String getAttribute(java.lang.String name, java.lang.String defaultValue)
           
 java.lang.String[] getAttributeNames()
           
 PlexusConfiguration getChild(int i)
           
 PlexusConfiguration getChild(java.lang.String name)
           
 PlexusConfiguration getChild(java.lang.String name, boolean create)
           
 int getChildCount()
           
 PlexusConfiguration[] getChildren()
           
 PlexusConfiguration[] getChildren(java.lang.String name)
           
 java.lang.String getName()
           
 PlexusConfiguration getParent()
           
 java.lang.String getValue()
           
 java.lang.String getValue(java.lang.String defaultValue)
           
 void removeChild(PlexusConfiguration configuration)
           
 void setAttribute(java.lang.String name, java.lang.String value)
           
 void setParent(PlexusConfiguration parent)
           
 void setValue(java.lang.String value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

private java.lang.String name

value

private java.lang.String value

attributes

private java.util.Map attributes

children

private java.util.List children

parent

private PlexusConfiguration parent
Constructor Detail

DefaultPlexusConfiguration

public DefaultPlexusConfiguration(java.lang.String name)
Method Detail

getName

public java.lang.String getName()
Specified by:
getName in interface PlexusConfiguration

getValue

public java.lang.String getValue()
                          throws PlexusConfigurationException
Specified by:
getValue in interface PlexusConfiguration
Throws:
PlexusConfigurationException

getValue

public java.lang.String getValue(java.lang.String defaultValue)
Specified by:
getValue in interface PlexusConfiguration

getAttributeNames

public java.lang.String[] getAttributeNames()
Specified by:
getAttributeNames in interface PlexusConfiguration

getChildren

public PlexusConfiguration[] getChildren()
Specified by:
getChildren in interface PlexusConfiguration

getAttribute

public java.lang.String getAttribute(java.lang.String name)
                              throws PlexusConfigurationException
Specified by:
getAttribute in interface PlexusConfiguration
Throws:
PlexusConfigurationException

getChild

public PlexusConfiguration getChild(int i)
Specified by:
getChild in interface PlexusConfiguration

getChildren

public PlexusConfiguration[] getChildren(java.lang.String name)
Specified by:
getChildren in interface PlexusConfiguration

setValue

public void setValue(java.lang.String value)

setAttribute

public void setAttribute(java.lang.String name,
                         java.lang.String value)

addChild

public void addChild(PlexusConfiguration configuration)

addAll

public void addAll(PlexusConfiguration other)

addAllAttributes

public void addAllAttributes(PlexusConfiguration other)

addAllChildren

public void addAllChildren(PlexusConfiguration other)

removeChild

public void removeChild(PlexusConfiguration configuration)

getChildCount

public int getChildCount()
Specified by:
getChildCount in interface PlexusConfiguration

getAttribute

public java.lang.String getAttribute(java.lang.String name,
                                     java.lang.String defaultValue)
Specified by:
getAttribute in interface PlexusConfiguration

getChild

public PlexusConfiguration getChild(java.lang.String name)
Specified by:
getChild in interface PlexusConfiguration

getChild

public PlexusConfiguration getChild(java.lang.String name,
                                    boolean create)
Specified by:
getChild in interface PlexusConfiguration

getParent

public PlexusConfiguration getParent()
Specified by:
getParent in interface PlexusConfiguration

setParent

public void setParent(PlexusConfiguration parent)
Specified by:
setParent in interface PlexusConfiguration