com.puppycrawl.tools.checkstyle

Class ConfigurationLoader

public final class ConfigurationLoader extends Object

Loads a configuration from a standard configuration XML file.

Version: 1.0

Author: Oliver Burn

Method Summary
static ConfigurationloadConfiguration(String aConfig, PropertyResolver aOverridePropsResolver)
Returns the module configurations in a specified file.
static ConfigurationloadConfiguration(String aConfig, PropertyResolver aOverridePropsResolver, boolean aOmitIgnoredModules)
Returns the module configurations in a specified file.
static ConfigurationloadConfiguration(InputStream aConfigStream, PropertyResolver aOverridePropsResolver, boolean aOmitIgnoredModules)
Returns the module configurations from a specified input stream.

Method Detail

loadConfiguration

public static Configuration loadConfiguration(String aConfig, PropertyResolver aOverridePropsResolver)
Returns the module configurations in a specified file.

Parameters: aConfig location of config file, can be either a URL or a filename aOverridePropsResolver overriding properties

Returns: the check configurations

Throws: CheckstyleException if an error occurs

loadConfiguration

public static Configuration loadConfiguration(String aConfig, PropertyResolver aOverridePropsResolver, boolean aOmitIgnoredModules)
Returns the module configurations in a specified file.

Parameters: aConfig location of config file, can be either a URL or a filename aOverridePropsResolver overriding properties aOmitIgnoredModules true if modules with severity 'ignore' should be omitted, false otherwise

Returns: the check configurations

Throws: CheckstyleException if an error occurs

loadConfiguration

public static Configuration loadConfiguration(InputStream aConfigStream, PropertyResolver aOverridePropsResolver, boolean aOmitIgnoredModules)
Returns the module configurations from a specified input stream. Note that clients are required to close the given stream by themselves

Parameters: aConfigStream the input stream to the Checkstyle configuration aOverridePropsResolver overriding properties aOmitIgnoredModules true if modules with severity 'ignore' should be omitted, false otherwise

Returns: the check configurations

Throws: CheckstyleException if an error occurs