com.puppycrawl.tools.checkstyle
Class DefaultConfiguration

java.lang.Object
  extended bycom.puppycrawl.tools.checkstyle.DefaultConfiguration
All Implemented Interfaces:
Configuration, java.io.Serializable

public final class DefaultConfiguration
extends java.lang.Object
implements Configuration

Default implementation of the Configuration interface.

Author:
lkuehne
See Also:
Serialized Form

Constructor Summary
DefaultConfiguration(java.lang.String aName)
          Instantiates a DefaultConfiguration.
 
Method Summary
 void addAttribute(java.lang.String aName, java.lang.String aValue)
          Adds an attribute to this configuration.
 void addChild(Configuration aConfiguration)
          Makes a configuration a child of this configuration.
 java.lang.String getAttribute(java.lang.String aName)
          The attribute value for an attribute name.
 java.lang.String[] getAttributeNames()
          The set of attribute names.
 Configuration[] getChildren()
          The set of child configurations.
 java.lang.String getName()
          The name of this configuration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultConfiguration

public DefaultConfiguration(java.lang.String aName)
Instantiates a DefaultConfiguration.

Parameters:
aName - the name for this DefaultConfiguration.
Method Detail

getAttributeNames

public java.lang.String[] getAttributeNames()
Description copied from interface: Configuration
The set of attribute names.

Specified by:
getAttributeNames in interface Configuration
Returns:
The set of attribute names, never null.
See Also:
Configuration

getAttribute

public java.lang.String getAttribute(java.lang.String aName)
                              throws CheckstyleException
Description copied from interface: Configuration
The attribute value for an attribute name.

Specified by:
getAttribute in interface Configuration
Parameters:
aName - the attribute name
Returns:
the value that is associated with aName
Throws:
CheckstyleException - if aName is not a valid attribute name
See Also:
Configuration

getChildren

public Configuration[] getChildren()
Description copied from interface: Configuration
The set of child configurations.

Specified by:
getChildren in interface Configuration
Returns:
The set of child configurations, never null.
See Also:
Configuration

getName

public java.lang.String getName()
Description copied from interface: Configuration
The name of this configuration.

Specified by:
getName in interface Configuration
Returns:
The name of this configuration.
See Also:
Configuration

addChild

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

Parameters:
aConfiguration - the child configuration.

addAttribute

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

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

Back to the Checkstyle Home Page