Package com.puppycrawl.tools.checkstyle
Class ConfigurationLoader
- java.lang.Object
-
- com.puppycrawl.tools.checkstyle.ConfigurationLoader
-
public final class ConfigurationLoader extends java.lang.Object
Loads a configuration from a standard configuration XML file.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ConfigurationLoader.IgnoredModulesOptions
Enum to specify behaviour regarding ignored modules.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Configuration
loadConfiguration(java.lang.String config, PropertyResolver overridePropsResolver)
Returns the module configurations in a specified file.static Configuration
loadConfiguration(java.lang.String config, PropertyResolver overridePropsResolver, ConfigurationLoader.IgnoredModulesOptions ignoredModulesOptions)
Returns the module configurations in a specified file.static Configuration
loadConfiguration(java.lang.String config, PropertyResolver overridePropsResolver, ConfigurationLoader.IgnoredModulesOptions ignoredModulesOptions, ThreadModeSettings threadModeSettings)
Returns the module configurations in a specified file.static Configuration
loadConfiguration(java.lang.String config, PropertyResolver overridePropsResolver, ThreadModeSettings threadModeSettings)
Returns the module configurations in a specified file.static Configuration
loadConfiguration(org.xml.sax.InputSource configSource, PropertyResolver overridePropsResolver, ConfigurationLoader.IgnoredModulesOptions ignoredModulesOptions)
Returns the module configurations from a specified input source.static Configuration
loadConfiguration(org.xml.sax.InputSource configSource, PropertyResolver overridePropsResolver, ConfigurationLoader.IgnoredModulesOptions ignoredModulesOptions, ThreadModeSettings threadModeSettings)
Returns the module configurations from a specified input source.
-
-
-
Method Detail
-
loadConfiguration
public static Configuration loadConfiguration(java.lang.String config, PropertyResolver overridePropsResolver) throws CheckstyleException
Returns the module configurations in a specified file.- Parameters:
config
- location of config file, can be either a URL or a filenameoverridePropsResolver
- overriding properties- Returns:
- the check configurations
- Throws:
CheckstyleException
- if an error occurs
-
loadConfiguration
public static Configuration loadConfiguration(java.lang.String config, PropertyResolver overridePropsResolver, ThreadModeSettings threadModeSettings) throws CheckstyleException
Returns the module configurations in a specified file.- Parameters:
config
- location of config file, can be either a URL or a filenameoverridePropsResolver
- overriding propertiesthreadModeSettings
- the thread mode configuration- Returns:
- the check configurations
- Throws:
CheckstyleException
- if an error occurs
-
loadConfiguration
public static Configuration loadConfiguration(java.lang.String config, PropertyResolver overridePropsResolver, ConfigurationLoader.IgnoredModulesOptions ignoredModulesOptions) throws CheckstyleException
Returns the module configurations in a specified file.- Parameters:
config
- location of config file, can be either a URL or a filenameoverridePropsResolver
- overriding propertiesignoredModulesOptions
-OMIT
if modules with severity 'ignore' should be omitted,EXECUTE
otherwise- Returns:
- the check configurations
- Throws:
CheckstyleException
- if an error occurs
-
loadConfiguration
public static Configuration loadConfiguration(java.lang.String config, PropertyResolver overridePropsResolver, ConfigurationLoader.IgnoredModulesOptions ignoredModulesOptions, ThreadModeSettings threadModeSettings) throws CheckstyleException
Returns the module configurations in a specified file.- Parameters:
config
- location of config file, can be either a URL or a filenameoverridePropsResolver
- overriding propertiesignoredModulesOptions
-OMIT
if modules with severity 'ignore' should be omitted,EXECUTE
otherwisethreadModeSettings
- the thread mode configuration- Returns:
- the check configurations
- Throws:
CheckstyleException
- if an error occurs
-
loadConfiguration
public static Configuration loadConfiguration(org.xml.sax.InputSource configSource, PropertyResolver overridePropsResolver, ConfigurationLoader.IgnoredModulesOptions ignoredModulesOptions) throws CheckstyleException
Returns the module configurations from a specified input source. Note that if the source does wrap an open byte or character stream, clients are required to close that stream by themselves- Parameters:
configSource
- the input stream to the Checkstyle configurationoverridePropsResolver
- overriding propertiesignoredModulesOptions
-OMIT
if modules with severity 'ignore' should be omitted,EXECUTE
otherwise- Returns:
- the check configurations
- Throws:
CheckstyleException
- if an error occurs
-
loadConfiguration
public static Configuration loadConfiguration(org.xml.sax.InputSource configSource, PropertyResolver overridePropsResolver, ConfigurationLoader.IgnoredModulesOptions ignoredModulesOptions, ThreadModeSettings threadModeSettings) throws CheckstyleException
Returns the module configurations from a specified input source. Note that if the source does wrap an open byte or character stream, clients are required to close that stream by themselves- Parameters:
configSource
- the input stream to the Checkstyle configurationoverridePropsResolver
- overriding propertiesignoredModulesOptions
-OMIT
if modules with severity 'ignore' should be omitted,EXECUTE
otherwisethreadModeSettings
- the thread mode configuration- Returns:
- the check configurations
- Throws:
CheckstyleException
- if an error occurs
-
-