Package com.puppycrawl.tools.checkstyle
Class DefaultContext
java.lang.Object
com.puppycrawl.tools.checkstyle.DefaultContext
- All Implemented Interfaces:
Context
A default implementation of the Context interface.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a context entry.Searches for the value with the specified attribute key in this context.Returns the names of all attributes of this context.
-
Field Details
-
entries
Stores the context entries.
-
-
Constructor Details
-
DefaultContext
public DefaultContext()
-
-
Method Details
-
get
Description copied from interface:Context
Searches for the value with the specified attribute key in this context. -
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.
-
add
Adds a context entry.- Parameters:
key
- the context keyvalue
- the value for key
-