Package | Description |
---|---|
com.puppycrawl.tools.checkstyle |
Contains the implementation of the Checkstyle framework.
|
com.puppycrawl.tools.checkstyle.api |
Contains the core API to be used to implement checks.
|
com.puppycrawl.tools.checkstyle.checks.header |
File Header checks.
|
com.puppycrawl.tools.checkstyle.checks.imports |
Contains the Imports checks that are
bundled with the main distribution.
|
com.puppycrawl.tools.checkstyle.checks.regexp |
Contains the regular expression checks that are bundled with the main
distribution.
|
com.puppycrawl.tools.checkstyle.filters |
Contains the filters that are bundled with the main distribution.
|
com.puppycrawl.tools.checkstyle.gui |
User interface classes for CheckStyle.
|
com.puppycrawl.tools.checkstyle.utils |
Contains utils classes for checkstyle.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
ModuleFactory.createModule(java.lang.String name)
Creates a new instance of a class from a given name.
|
java.lang.Object |
PackageObjectFactory.createModule(java.lang.String name)
Creates a new instance of a class from a given name, or that name
concatenated with "Check".
|
private java.lang.Object |
PackageObjectFactory.createObject(java.lang.String className)
Creates a new instance of a named class.
|
private java.lang.Object |
PackageObjectFactory.createObjectFromFullModuleNames(java.lang.String name,
java.util.Set<java.lang.String> fullModuleNames)
Create Object from optional full module names.
|
private java.lang.Object |
PackageObjectFactory.createObjectFromMap(java.lang.String name,
java.util.Map<java.lang.String,java.util.Set<java.lang.String>> map)
Create object with the help of the supplied map.
|
void |
Checker.finishLocalSetup() |
java.lang.String |
DefaultConfiguration.getAttribute(java.lang.String attributeName) |
static java.util.Set<java.lang.String> |
PackageNamesLoader.getPackageNames(java.lang.ClassLoader classLoader)
Returns the set of package names, compiled from all
checkstyle_packages.xml files found on the given class loaders
classpath.
|
private static RootModule |
Main.getRootModule(java.lang.String name,
java.lang.ClassLoader moduleClassLoader)
Creates a new instance of the root module that will control and run
Checkstyle.
|
static Configuration |
ConfigurationLoader.loadConfiguration(org.xml.sax.InputSource configSource,
PropertyResolver overridePropsResolver,
boolean omitIgnoredModules)
Returns the module configurations from a specified input source.
|
static Configuration |
ConfigurationLoader.loadConfiguration(java.io.InputStream configStream,
PropertyResolver overridePropsResolver,
boolean omitIgnoredModules)
Deprecated.
As this method does not provide a valid system ID,
preventing resolution of external entities, a
version using an InputSource
should be used instead |
static Configuration |
ConfigurationLoader.loadConfiguration(java.lang.String config,
PropertyResolver overridePropsResolver)
Returns the module configurations in a specified file.
|
static Configuration |
ConfigurationLoader.loadConfiguration(java.lang.String config,
PropertyResolver overridePropsResolver,
boolean omitIgnoredModules)
Returns the module configurations in a specified file.
|
private static byte[] |
PropertyCacheFile.loadExternalResource(java.lang.String location)
Loads the content of external resource.
|
private static java.util.Properties |
Main.loadProperties(java.io.File file)
Loads properties from a File.
|
private static DetailAST |
AstTreeStringPrinter.parseFile(java.io.File file,
boolean withComments)
Parse a file and return the parse tree.
|
private static DetailAST |
AstTreeStringPrinter.parseFileText(FileText text,
boolean withComments)
Parse a text and return the parse tree.
|
private static void |
ConfigurationLoader.parsePropertyString(java.lang.String value,
java.util.List<java.lang.String> fragments,
java.util.List<java.lang.String> propertyRefs)
Parses a string containing
${xxx} style property
references into two lists. |
static java.lang.String |
AstTreeStringPrinter.printAst(FileText text,
boolean withComments)
Parse a file and print the parse tree.
|
static java.lang.String |
AstTreeStringPrinter.printFileAst(java.io.File file,
boolean withComments)
Parse a file and print the parse tree.
|
static java.lang.String |
AstTreeStringPrinter.printJavaAndJavadocTree(java.io.File file)
Prints full AST (java + comments + javadoc) of the java file.
|
int |
Checker.process(java.util.List<java.io.File> files) |
private java.util.SortedSet<LocalizedMessage> |
Checker.processFile(java.io.File file)
Processes a file with all FileSetChecks.
|
private void |
Checker.processFiles(java.util.List<java.io.File> files)
Processes a list of files with all FileSetChecks.
|
protected void |
TreeWalker.processFiltered(java.io.File file,
java.util.List<java.lang.String> lines) |
private void |
TreeWalker.registerCheck(AbstractCheck check)
Register a check for a given configuration.
|
private void |
TreeWalker.registerCheck(int tokenId,
AbstractCheck check)
Register a check for a specified token id.
|
private void |
TreeWalker.registerCheck(java.lang.String token,
AbstractCheck check)
Register a check for a specified token name.
|
private static java.lang.String |
ConfigurationLoader.replaceProperties(java.lang.String value,
PropertyResolver props,
java.lang.String defaultValue)
Replaces
${xxx} style constructions in the given value
with the string value of the corresponding data types. |
private static int |
Main.runCheckstyle(Main.CliOptions cliOptions)
Executes required Checkstyle actions based on passed parameters.
|
private static int |
Main.runCli(org.apache.commons.cli.CommandLine commandLine,
java.util.List<java.io.File> filesToProcess)
Do execution of CheckStyle based on Command line options.
|
void |
TreeWalker.setupChild(Configuration childConf) |
protected void |
Checker.setupChild(Configuration childConf) |
private static void |
TreeWalker.validateDefaultTokens(AbstractCheck check)
Validates that check's required tokens are subset of default tokens.
|
Modifier and Type | Method and Description |
---|---|
void |
Configurable.configure(Configuration configuration)
Configures this component.
|
void |
AutomaticBean.configure(Configuration config)
Implements the Configurable interface using bean introspection.
|
void |
Contextualizable.contextualize(Context context)
Sets the context for this Component.
|
void |
AutomaticBean.contextualize(Context context)
Implements the Contextualizable interface using bean introspection.
|
protected void |
AutomaticBean.finishLocalSetup()
Provides a hook to finish the part of this component's setup that
was not handled by the bean introspection.
|
java.lang.String |
Configuration.getAttribute(java.lang.String name)
The attribute value for an attribute name.
|
java.util.SortedSet<LocalizedMessage> |
AbstractFileSetCheck.process(java.io.File file,
java.util.List<java.lang.String> lines) |
java.util.SortedSet<LocalizedMessage> |
FileSetCheck.process(java.io.File file,
java.util.List<java.lang.String> lines)
Request to process a file.
|
int |
RootModule.process(java.util.List<java.io.File> files)
Processes a set of files.
|
protected abstract void |
AbstractFileSetCheck.processFiltered(java.io.File file,
java.util.List<java.lang.String> lines)
Called to process a file that matches the specified file extensions.
|
protected void |
AutomaticBean.setupChild(Configuration childConf)
Called by configure() for every child of this component's Configuration.
|
private void |
AutomaticBean.tryCopyProperty(java.lang.String moduleName,
java.lang.String key,
java.lang.Object value,
boolean recheck)
Recheck property and try to copy it.
|
Modifier and Type | Method and Description |
---|---|
protected void |
AbstractHeaderCheck.finishLocalSetup() |
private void |
AbstractHeaderCheck.loadHeaderFile()
Load the header from a file.
|
void |
AbstractHeaderCheck.setHeaderFile(java.net.URI uri)
Set the header file to check against.
|
Modifier and Type | Method and Description |
---|---|
private static void |
ImportControlLoader.closeStream(java.io.InputStream inputStream)
This method exists only due to bug in cobertura library
https://github.com/cobertura/cobertura/issues/170
|
private static ImportControl |
ImportControlLoader.load(org.xml.sax.InputSource source,
java.net.URI uri)
Loads the import control file from a
InputSource . |
static ImportControl |
ImportControlLoader.load(java.net.URI uri)
Loads the import control file from a file.
|
Modifier and Type | Method and Description |
---|---|
private static java.lang.String |
RegexpOnFilenameCheck.getFolderPath(java.io.File file)
Retrieves the folder path from the given
file . |
protected void |
RegexpOnFilenameCheck.processFiltered(java.io.File file,
java.util.List<java.lang.String> lines) |
Modifier and Type | Method and Description |
---|---|
protected void |
SuppressionFilter.finishLocalSetup() |
private static FilterSet |
SuppressionsLoader.loadSuppressions(org.xml.sax.InputSource source,
java.lang.String sourceName)
Returns the suppression filters in a specified source.
|
static FilterSet |
SuppressionsLoader.loadSuppressions(java.lang.String filename)
Returns the suppression filters in a specified file.
|
Modifier and Type | Method and Description |
---|---|
void |
MainFrameModel.openFile(java.io.File file)
Open file and load the file.
|
Modifier and Type | Method and Description |
---|---|
static java.net.URI |
CommonUtils.getUriByFilename(java.lang.String filename)
Resolve the specified filename to a URI.
|