Package com.puppycrawl.tools.checkstyle
Class DefaultContext
- java.lang.Object
-
- com.puppycrawl.tools.checkstyle.DefaultContext
-
- All Implemented Interfaces:
Context
public final class DefaultContext extends Object implements Context
A default implementation of the Context interface.
-
-
Constructor Summary
Constructors Constructor Description DefaultContext()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(String key, Object value)
Adds a context entry.Object
get(String key)
Searches for the value with the specified attribute key in this context.Collection<String>
getAttributeNames()
Returns the names of all attributes of this context.
-
-
-
Constructor Detail
-
DefaultContext
public DefaultContext()
-
-
Method Detail
-
get
public Object get(String key)
Description copied from interface:Context
Searches for the value with the specified attribute key in this context.
-
getAttributeNames
public Collection<String> getAttributeNames()
Description copied from interface:Context
Returns the names of all attributes of this context.- Specified by:
getAttributeNames
in interfaceContext
- Returns:
- the names of all attributes of this context.
-
-