com.puppycrawl.tools.checkstyle

Class DefaultConfiguration

public final class DefaultConfiguration extends Object implements Configuration

Default implementation of the Configuration interface.

Author: lkuehne

Constructor Summary
DefaultConfiguration(String aName)
Instantiates a DefaultConfiguration.
Method Summary
voidaddAttribute(String aName, String aValue)
Adds an attribute to this configuration.
voidaddChild(Configuration aConfiguration)
Makes a configuration a child of this configuration.
StringgetAttribute(String aName)
{@inheritDoc}
String[]getAttributeNames()
{@inheritDoc}
Configuration[]getChildren()
{@inheritDoc}
StringgetName()
{@inheritDoc}
voidremoveChild(Configuration aConfiguration)
Removes a child of this configuration.

Constructor Detail

DefaultConfiguration

public DefaultConfiguration(String aName)
Instantiates a DefaultConfiguration.

Parameters: aName the name for this DefaultConfiguration.

Method Detail

addAttribute

public void addAttribute(String aName, String aValue)
Adds an attribute to this configuration.

Parameters: aName the name of the attribute. aValue the value of the attribute.

addChild

public void addChild(Configuration aConfiguration)
Makes a configuration a child of this configuration.

Parameters: aConfiguration the child configuration.

getAttribute

public String getAttribute(String aName)
{@inheritDoc}

getAttributeNames

public String[] getAttributeNames()
{@inheritDoc}

getChildren

public Configuration[] getChildren()
{@inheritDoc}

getName

public String getName()
{@inheritDoc}

removeChild

public void removeChild(Configuration aConfiguration)
Removes a child of this configuration.

Parameters: aConfiguration the child configuration to remove.