Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.puppycrawl.tools.checkstyle.api
Class AutomaticBean  view AutomaticBean download AutomaticBean.java

java.lang.Object
  extended bycom.puppycrawl.tools.checkstyle.api.AutomaticBean
All Implemented Interfaces:
Configurable, Contextualizable
Direct Known Subclasses:
AbstractViolationReporter, AutomaticBeanTest.TestBean

public class AutomaticBean
extends java.lang.Object
implements Configurable, Contextualizable

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


Field Summary
private  Configuration mConfiguration
          the configuration of this bean
 
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.
private static void initConverters()
          Setup the jakarta-commons-beanutils type converters so they throw a ConversionException instead of using the default value.
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
 

Field Detail

mConfiguration

private Configuration mConfiguration
the configuration of this bean

Constructor Detail

AutomaticBean

public AutomaticBean()
Method Detail

initConverters

private static void initConverters()
Setup the jakarta-commons-beanutils type converters so they throw a ConversionException instead of using the default value.


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 55 is called to allow completion of the bean's local setup, after that the method setupChild 55 is called for each child Configuration 55 of aConfiguration.

Specified by:
configure in interface Configurable

contextualize

public final void contextualize(Context aContext)
                         throws CheckstyleException
Implements the Contextualizable interface using bean introspection.

Specified by:
contextualize in interface Contextualizable

getConfiguration

protected final Configuration getConfiguration()
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.


setupChild

protected void setupChild(Configuration aChildConf)
                   throws CheckstyleException
Called by configure() for every child of this component's Configuration.

The default implementation does nothing.