Uses of Class
com.puppycrawl.tools.checkstyle.api.CheckstyleException
Packages that use CheckstyleException
Package
Description
Contains the implementation of the Checkstyle framework.
Contains the core API to be used to implement checks.
File Header checks.
Contains the Imports checks that are
bundled with the main distribution.
Contains the Javadoc checks that are bundled with the main distribution.
Contains the regular expression checks that are bundled with the main
distribution.
Contains the filters that are bundled with the main distribution.
User interface classes for CheckStyle.
Contains module metadata generation classes for checkstyle.
Contains utils classes for checkstyle.
-
Uses of CheckstyleException in com.puppycrawl.tools.checkstyle
Methods in com.puppycrawl.tools.checkstyle that throw CheckstyleExceptionModifier and TypeMethodDescriptionfinal void
AbstractAutomaticBean.configure
(Configuration config) Implements the Configurable interface using bean introspection.final void
AbstractAutomaticBean.contextualize
(Context context) Implements the Contextualizable interface using bean introspection.private Object
PackageObjectFactory.createFromStandardCheckSet
(String name) Create object from one of Checkstyle module names.ModuleFactory.createModule
(String name) Creates a new instance of a class from a given name.PackageObjectFactory.createModule
(String name) Creates a new instance of a class from a given name, or that name concatenated with "Check".private Object
PackageObjectFactory.createModuleByTryInEachPackage
(String name) Searching to class with given name (or name concatenated with "Check") in existing packages.private Object
PackageObjectFactory.createObject
(String className) Creates a new instance of a named class.private Object
PackageObjectFactory.createObjectFromClassPath
(String name) Create object with the help of the classpath.private Object
PackageObjectFactory.createObjectFromFullModuleNames
(String name, Set<String> fullModuleNames) Create Object from optional full module names.private static int
Main.execute
(picocli.CommandLine.ParseResult parseResult, Main.CliOptions options) Validates the user input and returns -1 if invalid, otherwise executes CheckStyle and returns the number of violations.protected abstract void
AbstractAutomaticBean.finishLocalSetup()
Provides a hook to finish the part of this component's setup that was not handled by the bean introspection.protected void
Checker.finishLocalSetup()
private static void
JavadocPropertiesGenerator.formatInlineCodeTag
(StringBuilder builder, DetailNode inlineTag) Converts inline code tag into HTML form.DefaultConfiguration.getAttribute
(String attributeName) private static String
JavadocPropertiesGenerator.getFirstJavadocSentence
(DetailAST ast) Extracts the first sentence as HTML formatted text from the comment of an DetailAST.private static String
JavadocPropertiesGenerator.getFirstJavadocSentence
(DetailNode tree) Extracts the first sentence as HTML formatted text from a DetailNode.PackageNamesLoader.getPackageNames
(ClassLoader classLoader) Returns the set of package names, compiled from all checkstyle_packages.xml files found on the given class loaders classpath.DefaultConfiguration.getProperty
(String propertyName) private static RootModule
Main.getRootModule
(String name, ClassLoader moduleClassLoader) Creates a new instance of the root module that will control and run Checkstyle.private static void
JavadocPropertiesGenerator.iteratePublicStaticIntFields
(DetailAST objBlock, Consumer<String> consumer) Walks over the type members and push the first javadoc sentence of everypublic
static
int
field to the consumer.static Configuration
ConfigurationLoader.loadConfiguration
(String config, PropertyResolver overridePropsResolver) Returns the module configurations in a specified file.static Configuration
ConfigurationLoader.loadConfiguration
(String config, PropertyResolver overridePropsResolver, ConfigurationLoader.IgnoredModulesOptions ignoredModulesOptions) Returns the module configurations in a specified file.static Configuration
ConfigurationLoader.loadConfiguration
(String config, PropertyResolver overridePropsResolver, ConfigurationLoader.IgnoredModulesOptions ignoredModulesOptions, ThreadModeSettings threadModeSettings) Returns the module configurations in a specified file.static Configuration
ConfigurationLoader.loadConfiguration
(String config, PropertyResolver overridePropsResolver, ThreadModeSettings threadModeSettings) Returns the module configurations in a specified file.static Configuration
ConfigurationLoader.loadConfiguration
(InputSource configSource, PropertyResolver overridePropsResolver, ConfigurationLoader.IgnoredModulesOptions ignoredModulesOptions) Returns the module configurations from a specified input source.static Configuration
ConfigurationLoader.loadConfiguration
(InputSource configSource, PropertyResolver overridePropsResolver, ConfigurationLoader.IgnoredModulesOptions ignoredModulesOptions, ThreadModeSettings threadModeSettings) Returns the module configurations from a specified input source.private static byte[]
PropertyCacheFile.loadExternalResource
(String location) Loads the content of external resource.private static Properties
Main.loadProperties
(File file) Loads properties from a File.static void
TokenTypes.properties generator entry point.static DetailAST
JavaParser.parse
(FileContents contents) Static helper method to parses a Java source file.static DetailAST
JavaParser.parseFile
(File file, JavaParser.Options options) Parses Java source file.static DetailAST
JavaParser.parseFileText
(FileText text, JavaParser.Options options) Parse a text and return the parse tree.private static void
ConfigurationLoader.parsePropertyString
(String value, Collection<String> fragments, Collection<String> propertyRefs) Parses a string containing${xxx}
style property references into two collections.static String
AstTreeStringPrinter.printAst
(FileText text, JavaParser.Options options) Parse a file and print the parse tree.static String
AstTreeStringPrinter.printFileAst
(File file, JavaParser.Options options) Parse a file and print the parse tree.static String
AstTreeStringPrinter.printJavaAndJavadocTree
(File file) Prints full AST (java + comments + javadoc) of the java file.static String
SuppressionsStringPrinter.printSuppressions
(File file, String suppressionLineColumnNumber, int tabWidth) Prints generated suppressions.int
Checker.processFile
(File file) Processes a file with all FileSetChecks.private static void
PackageNamesLoader.processFile
(URL packageFile, PackageNamesLoader namesLoader) Reads the file provided and parses it with package names loader.private void
Checker.processFiles
(List<File> files) Processes a list of files with all FileSetChecks.protected void
TreeWalker.processFiltered
(File file, FileText fileText) Called to process a file that matches the specified file extensions.private void
TreeWalker.registerCheck
(int tokenId, AbstractCheck check) Register a check for a specified token id.private void
TreeWalker.registerCheck
(AbstractCheck check) Register a check for a given configuration.private static String
ConfigurationLoader.replaceProperties
(String value, PropertyResolver props, 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 options, List<File> filesToProcess) Executes required Checkstyle actions based on passed parameters.private static int
Main.runCli
(Main.CliOptions options, List<File> filesToProcess) Do execution of CheckStyle based on Command line options.protected void
AbstractAutomaticBean.setupChild
(Configuration childConf) Called by configure() for every child of this component's Configuration.protected void
Checker.setupChild
(Configuration childConf) Called by configure() for every child of this component's Configuration.void
TreeWalker.setupChild
(Configuration childConf) Called by configure() for every child of this component's Configuration.private void
AbstractAutomaticBean.tryCopyProperty
(String key, Object value, boolean recheck) Recheck property and try to copy it.private static void
JavadocPropertiesGenerator.writePropertiesFile
(JavadocPropertiesGenerator.CliOptions options) Creates the .properties file from a .java file. -
Uses of CheckstyleException in com.puppycrawl.tools.checkstyle.api
Methods in com.puppycrawl.tools.checkstyle.api that throw CheckstyleExceptionModifier and TypeMethodDescriptionvoid
Configurable.configure
(Configuration configuration) Configures this component.void
Contextualizable.contextualize
(Context context) Sets the context for this Component.protected void
AbstractViolationReporter.finishLocalSetup()
Configuration.getAttribute
(String name) Deprecated.This shall be removed in future releases.Configuration.getProperty
(String name) The property value for property name.Request to process a file.int
Processes a set of files.protected abstract void
AbstractFileSetCheck.processFiltered
(File file, FileText fileText) Called to process a file that matches the specified file extensions. -
Uses of CheckstyleException in com.puppycrawl.tools.checkstyle.checks.header
Methods in com.puppycrawl.tools.checkstyle.checks.header that throw CheckstyleExceptionModifier and TypeMethodDescriptionprotected final void
AbstractHeaderCheck.finishLocalSetup()
private void
AbstractHeaderCheck.loadHeaderFile()
Load the header from a file.void
AbstractHeaderCheck.setHeaderFile
(URI uri) Setter to specify the name of the file containing the required header. -
Uses of CheckstyleException in com.puppycrawl.tools.checkstyle.checks.imports
Methods in com.puppycrawl.tools.checkstyle.checks.imports that throw CheckstyleExceptionModifier and TypeMethodDescriptionstatic PkgImportControl
Loads the import control file from a file.private static PkgImportControl
ImportControlLoader.load
(InputSource source, URI uri) Loads the import control file from aInputSource
.private static PkgImportControl
Loads the import control file from a URI. -
Uses of CheckstyleException in com.puppycrawl.tools.checkstyle.checks.javadoc
Methods in com.puppycrawl.tools.checkstyle.checks.javadoc that throw CheckstyleExceptionModifier and TypeMethodDescriptionprotected void
JavadocPackageCheck.processFiltered
(File file, FileText fileText) -
Uses of CheckstyleException in com.puppycrawl.tools.checkstyle.checks.regexp
Methods in com.puppycrawl.tools.checkstyle.checks.regexp that throw CheckstyleExceptionModifier and TypeMethodDescriptionprivate static String
RegexpOnFilenameCheck.getFolderPath
(File file) Retrieves the folder path from the givenfile
.protected void
RegexpOnFilenameCheck.processFiltered
(File file, FileText fileText) -
Uses of CheckstyleException in com.puppycrawl.tools.checkstyle.filters
Methods in com.puppycrawl.tools.checkstyle.filters that throw CheckstyleExceptionModifier and TypeMethodDescriptionprotected void
SuppressionFilter.finishLocalSetup()
protected void
SuppressionXpathFilter.finishLocalSetup()
private static SuppressionsLoader
SuppressionsLoader.getSuppressionLoader
(InputSource source, String sourceName) Parses specified source and returns the suppression loader.static FilterSet
SuppressionsLoader.loadSuppressions
(String filename) Returns the suppression filters in a specified file.private static FilterSet
SuppressionsLoader.loadSuppressions
(InputSource source, String sourceName) Returns the suppression filters in a specified source.static Set<TreeWalkerFilter>
SuppressionsLoader.loadXpathSuppressions
(String filename) Returns the suppressionTreeWalker
filters in a specified file.private static Set<TreeWalkerFilter>
SuppressionsLoader.loadXpathSuppressions
(InputSource source, String sourceName) Returns the suppressionTreeWalker
filters in a specified source. -
Uses of CheckstyleException in com.puppycrawl.tools.checkstyle.gui
Methods in com.puppycrawl.tools.checkstyle.gui that throw CheckstyleException -
Uses of CheckstyleException in com.puppycrawl.tools.checkstyle.meta
Methods in com.puppycrawl.tools.checkstyle.meta that throw CheckstyleExceptionModifier and TypeMethodDescriptionstatic void
MetadataGeneratorUtil.generate
(String path, OutputStream out, String... moduleFolders) Generate metadata from the module source files available in the input argument path. -
Uses of CheckstyleException in com.puppycrawl.tools.checkstyle.utils
Methods in com.puppycrawl.tools.checkstyle.utils that throw CheckstyleExceptionModifier and TypeMethodDescriptionprivate static URI
CommonUtil.getFilepathOrClasspathUri
(String filename) Resolves the specified local filename, possibly with 'classpath:' protocol, to a URI.static Properties
ChainedPropertyUtil.getResolvedProperties
(Properties properties) Accepts user defined properties and returns new properties with all chained properties resolved.static URI
CommonUtil.getResourceFromClassPath
(String filename) Gets a resource from the classpath.static URI
CommonUtil.getUriByFilename
(String filename) Resolve the specified filename to a URI.static String
XpathUtil.printXpathBranch
(String xpath, File file) Returns xpath query results on file as string.static InputSource
CommonUtil.sourceFromFilename
(String filename) Creates an input source from a file.