public final class DefaultConfiguration extends Object implements Configuration
| Constructor and Description |
|---|
DefaultConfiguration(String name)
Instantiates a DefaultConfiguration.
|
DefaultConfiguration(String name,
ThreadModeSettings threadModeSettings)
Instantiates a DefaultConfiguration.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAttribute(String attributeName,
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 attributeName)
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.
|
ThreadModeSettings |
getThreadModeSettings()
Gets the thread mode configuration.
|
void |
removeChild(Configuration configuration)
Removes a child of this configuration.
|
public DefaultConfiguration(String name)
name - the name for this DefaultConfiguration.public DefaultConfiguration(String name, ThreadModeSettings threadModeSettings)
name - the name for this DefaultConfiguration.threadModeSettings - the thread mode configuration.public String[] getAttributeNames()
ConfigurationgetAttributeNames in interface Configurationpublic String getAttribute(String attributeName) throws CheckstyleException
ConfigurationgetAttribute in interface ConfigurationattributeName - the attribute nameCheckstyleException - if name is not a valid attribute namepublic Configuration[] getChildren()
ConfigurationgetChildren in interface Configurationpublic String getName()
ConfigurationgetName 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 attributeName, String value)
attributeName - 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 Configurationpublic ThreadModeSettings getThreadModeSettings()
Copyright © 2001–2018. All rights reserved.