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.api
Class AutomaticBean

    java.lang.Object
      com.puppycrawl.tools.checkstyle.api.AutomaticBean

All Implemented Interfaces:
  Configurable, Contextualizable

Direct Known Subclasses:
  AbstractViolationReporter, Checker, DefaultLogger, SeverityMatchFilter, SuppressionCommentFilter, SuppressionFilter, XMLLogger

    public class AutomaticBean

extends Object
implements Configurable, Contextualizable

A Java Bean that implements the component lifecycle interfaces by calling the bean's setters for all configration attributes.

Author:
  lkuehne

Constructor Summary
`AutomaticBean()`

Method Summary
`void` | `configure(Configuration aConfiguration)` Implements the Configurable interface using bean introspection.
`void` | `contextualize(Context aContext)` Implements the Contextualizable interface using bean introspection.
`protected void` | `finishLocalSetup()` Provides a hook to finish the part of this compoent's setup that was not handled by the bean introspection.
`protected Configuration` | `getConfiguration()` Returns the configuration that was used to configure this component.
`protected void` | `setupChild(Configuration aChildConf)` Called by configure() for every child of this component's Configuration.

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

Constructor Detail

### AutomaticBean

    public AutomaticBean()

Method Detail

### configure

    public final void configure(Configuration aConfiguration)
                         throws CheckstyleException

  Implements the Configurable interface using bean introspection. Subclasses are allowed to add behaviour. After the bean based setup has completed first the method `finishLocalSetup` is called to allow completion of the bean's local setup, after that the method `setupChild` is called for each `child Configuration` of `aConfiguration`.

  Specified by:
    `configure` in interface `Configurable`
  Parameters:
    `aConfiguration` - the configuration to use.
  Throws:
    `CheckstyleException` - if there is a configuration error.
  See Also:
    `Configurable`

### contextualize

    public final void contextualize(Context aContext)
                             throws CheckstyleException

  Implements the Contextualizable interface using bean introspection.

  Specified by:
    `contextualize` in interface `Contextualizable`
  Parameters:
    `aContext` - the context.
  Throws:
    `CheckstyleException` - if there is a contextualization error.
  See Also:
    `Contextualizable`

### getConfiguration

    protected final Configuration getConfiguration()

  Returns the configuration that was used to configure this component.

  Returns:
    the configuration that was used to configure this component.

### finishLocalSetup

    protected void finishLocalSetup()
                             throws CheckstyleException

  Provides a hook to finish the part of this compoent's setup that was not handled by the bean introspection.

  The default implementation does nothing.

  Throws:
    `CheckstyleException` - if there is a configuration error.

### setupChild

    protected void setupChild(Configuration aChildConf)
                       throws CheckstyleException

  Called by configure() for every child of this component's Configuration.

  The default implementation does nothing.

  Parameters:
    `aChildConf` - a child of this component's Configuration
  Throws:
    `CheckstyleException` - if there is a configuration error.
  See Also:
    `Configuration.getChildren()`

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