public abstract class AutomaticBean extends Object implements Configurable, Contextualizable
| Modifier and Type | Class and Description |
|---|---|
static class |
AutomaticBean.OutputStreamOptions
Enum to specify behaviour regarding ignored modules.
|
| Constructor and Description |
|---|
AutomaticBean() |
| Modifier and Type | Method and Description |
|---|---|
void |
configure(Configuration config)
Implements the Configurable interface using bean introspection.
|
void |
contextualize(Context context)
Implements the Contextualizable interface using bean introspection.
|
protected abstract void |
finishLocalSetup()
Provides a hook to finish the part of this component'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 childConf)
Called by configure() for every child of this component's Configuration.
|
public AutomaticBean()
protected abstract void finishLocalSetup() throws CheckstyleException
The default implementation does nothing.
CheckstyleException - if there is a configuration error.public final void configure(Configuration config) throws CheckstyleException
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 configuration.
configure in interface Configurableconfig - the configuration to use.CheckstyleException - if there is a configuration error.Configurablepublic final void contextualize(Context context) throws CheckstyleException
contextualize in interface Contextualizablecontext - the context.CheckstyleException - if there is a contextualization error.Contextualizableprotected final Configuration getConfiguration()
protected void setupChild(Configuration childConf) throws CheckstyleException
The default implementation throws CheckstyleException if
childConf is null because it doesn't support children. It
must be overridden to validate and support children that are wanted.
childConf - a child of this component's ConfigurationCheckstyleException - if there is a configuration error.Configuration.getChildren()Copyright © 2001–2018. All rights reserved.