public final class DefaultConfiguration extends Object implements Configuration
Constructor and Description |
---|
DefaultConfiguration(String aName)
Instantiates a DefaultConfiguration.
|
Modifier and Type | Method and Description |
---|---|
void |
addAttribute(String aName,
String aValue)
Adds an attribute to this configuration.
|
void |
addChild(Configuration aConfiguration)
Makes a configuration a child of this configuration.
|
void |
addMessage(String aKey,
String aValue)
Adds a custom message to this configuration.
|
String |
getAttribute(String aName)
The attribute value for an attribute name.
|
String[] |
getAttributeNames()
The set of attribute names.
|
Configuration[] |
getChildren()
The set of child configurations.
|
com.google.common.collect.ImmutableMap<String,String> |
getMessages()
Returns an unmodifiable map instance containing the custom messages
for this configuration.
|
String |
getName()
The name of this configuration.
|
void |
removeChild(Configuration aConfiguration)
Removes a child of this configuration.
|
public DefaultConfiguration(String aName)
aName
- the name for this DefaultConfiguration.public String[] getAttributeNames()
getAttributeNames
in interface Configuration
public String getAttribute(String aName) throws CheckstyleException
getAttribute
in interface Configuration
aName
- the attribute nameCheckstyleException
- if aName is not a valid attribute namepublic Configuration[] getChildren()
getChildren
in interface Configuration
public String getName()
getName
in interface Configuration
public void addChild(Configuration aConfiguration)
aConfiguration
- the child configuration.public void removeChild(Configuration aConfiguration)
aConfiguration
- the child configuration to remove.public void addAttribute(String aName, String aValue)
aName
- the name of the attribute.aValue
- the value of the attribute.public void addMessage(String aKey, String aValue)
aKey
- the message keyaValue
- the custom message patternpublic com.google.common.collect.ImmutableMap<String,String> getMessages()
getMessages
in interface Configuration
Copyright © 2001–2015. All rights reserved.