Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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.

Author:
  lkuehne

Constructor Summary
`DefaultContext()`

Method Summary
`void` | `add(String aKey, Object aValue)` Adds a context entry.
`Object` | `get(String aKey)` Searches for the value with the specified attribute key in this context.
`String[]` | `getAttributeNames()` Returns the names of all atttributes of this context.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DefaultContext

    public DefaultContext()

Method Detail

### get

    public Object get(String aKey)

  Searches for the value with the specified attribute key in this context.

  Specified by:
    `get` in interface `Context`
  Parameters:
    `aKey` - the attribute key.
  Returns:
    the value in this context with the specified attribute key value.

### getAttributeNames

    public String[] getAttributeNames()

  Returns the names of all atttributes of this context.

  Specified by:
    `getAttributeNames` in interface `Context`
  Returns:
    the names of all atttributes of this context.

### add

    public void add(String aKey,
                    Object aValue)

  Adds a context entry.

  Parameters:
    `aKey` - the context key
    `aValue` - the value for aKey

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Back to the Checkstyle Home Page
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD