public final class DefaultConfiguration extends Object implements Configuration
| Constructor and Description |
|---|
DefaultConfiguration(String name)
Instantiates a DefaultConfiguration.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAttribute(String name,
String value)
Adds an attribute to this configuration.
|
void |
addChild(Configuration configuration)
Makes a configuration a child of this configuration.
|
void |
addMessage(String key,
String value)
Adds a custom message to this configuration.
|
String |
getAttribute(String name)
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 configuration)
Removes a child of this configuration.
|
public DefaultConfiguration(String name)
name - the name for this DefaultConfiguration.public String[] getAttributeNames()
getAttributeNames in interface Configurationpublic String getAttribute(String name) throws CheckstyleException
getAttribute in interface Configurationname - the attribute nameCheckstyleException - if name is not a valid attribute namepublic Configuration[] getChildren()
getChildren in interface Configurationpublic String getName()
getName in interface Configurationpublic void addChild(Configuration configuration)
configuration - the child configuration.public void removeChild(Configuration configuration)
configuration - the child configuration to remove.public void addAttribute(String name, String value)
name - the name of the attribute.value - the value of the attribute.public void addMessage(String key, String value)
key - the message keyvalue - the custom message patternpublic com.google.common.collect.ImmutableMap<String,String> getMessages()
getMessages in interface ConfigurationCopyright © 2001–2015. All rights reserved.