Uses of Class
com.puppycrawl.tools.checkstyle.api.AbstractCheck
-
Packages that use AbstractCheck Package Description com.puppycrawl.tools.checkstyle Contains the implementation of the Checkstyle framework.com.puppycrawl.tools.checkstyle.checks Contains the checks that are bundled with the main distribution.com.puppycrawl.tools.checkstyle.checks.annotation Contains the Annotation checks that are bundled with the main distribution.com.puppycrawl.tools.checkstyle.checks.blocks Contains the Block checks that are bundled with the main distribution.com.puppycrawl.tools.checkstyle.checks.coding Contains the Coding checks that are bundled with the main distribution.com.puppycrawl.tools.checkstyle.checks.design Contains the Class Design checks that are bundled with the main distribution.com.puppycrawl.tools.checkstyle.checks.imports Contains the Imports checks that are bundled with the main distribution.com.puppycrawl.tools.checkstyle.checks.indentation Contains all classes required for the indentation check.com.puppycrawl.tools.checkstyle.checks.javadoc Contains the Javadoc checks that are bundled with the main distribution.com.puppycrawl.tools.checkstyle.checks.metrics Contains the Metrics checks that are bundled with the main distribution.com.puppycrawl.tools.checkstyle.checks.modifier Contains the modifier checks that are bundled with the main distribution.com.puppycrawl.tools.checkstyle.checks.naming Contains the Naming conventions 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.checks.sizes Contains the Size Violations checks that are bundled with the main distribution.com.puppycrawl.tools.checkstyle.checks.whitespace Contains the Whitespace checks that are bundled with the main distribution.com.puppycrawl.tools.checkstyle.meta Contains module metadata generation classes for checkstyle.com.puppycrawl.tools.checkstyle.site Contains classes for generating the Checkstyle website. -
-
Uses of AbstractCheck in com.puppycrawl.tools.checkstyle
Fields in com.puppycrawl.tools.checkstyle with type parameters of type AbstractCheck Modifier and Type Field Description private Set<AbstractCheck>
TreeWalker. commentChecks
Registered comment checks.private Set<AbstractCheck>
TreeWalker. ordinaryChecks
Registered ordinary checks, that don't use comment nodes.private Map<Integer,Set<AbstractCheck>>
TreeWalker. tokenToCommentChecks
Maps from token name to comment checks.private Map<Integer,Set<AbstractCheck>>
TreeWalker. tokenToOrdinaryChecks
Maps from token name to ordinary checks.Methods in com.puppycrawl.tools.checkstyle that return types with arguments of type AbstractCheck Modifier and Type Method Description private static SortedSet<AbstractCheck>
TreeWalker. createNewCheckSortedSet()
Creates a newSortedSet
with a deterministic order based on the Check's name before the default ordering.private Collection<AbstractCheck>
TreeWalker. getListOfChecks(DetailAST ast, TreeWalker.AstState astState)
Method returns list of checks.Methods in com.puppycrawl.tools.checkstyle with parameters of type AbstractCheck Modifier and Type Method Description 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. -
Uses of AbstractCheck in com.puppycrawl.tools.checkstyle.checks
Subclasses of AbstractCheck in com.puppycrawl.tools.checkstyle.checks Modifier and Type Class Description class
ArrayTypeStyleCheck
Checks the style of array type definitions.class
AvoidEscapedUnicodeCharactersCheck
Restricts using Unicode escapes (such as \u221e).class
DescendantTokenCheck
Checks for restricted tokens beneath other tokens.class
FinalParametersCheck
Checks that parameters for methods, constructors, catch and for-each blocks are final.class
NoCodeInFileCheck
Checks whether file contains code.class
OuterTypeFilenameCheck
Checks that the outer type name and the file name match.class
SuppressWarningsHolder
Maintains a set of check suppressions from@SuppressWarnings
annotations.class
TodoCommentCheck
Checks forTODO:
comments.class
TrailingCommentCheck
The check to ensure that lines with code do not end with comment.class
UncommentedMainCheck
Detects uncommentedmain
methods.class
UpperEllCheck
Checks that long constants are defined with an upper ell. -
Uses of AbstractCheck in com.puppycrawl.tools.checkstyle.checks.annotation
Subclasses of AbstractCheck in com.puppycrawl.tools.checkstyle.checks.annotation Modifier and Type Class Description class
AnnotationLocationCheck
Checks location of annotation on language elements.class
AnnotationOnSameLineCheck
Checks that annotations are located on the same line with their targets.class
AnnotationUseStyleCheck
Checks the style of elements in annotations.class
MissingDeprecatedCheck
Verifies that the annotation@Deprecated
and the Javadoc tag@deprecated
are both present when either of them is present.class
MissingOverrideCheck
Verifies that the@Override
annotation is present when the@inheritDoc
javadoc tag is present.class
PackageAnnotationCheck
Checks that all package annotations are in the package-info.java file.class
SuppressWarningsCheck
Allows to specify what warnings that@SuppressWarnings
is not allowed to suppress. -
Uses of AbstractCheck in com.puppycrawl.tools.checkstyle.checks.blocks
Subclasses of AbstractCheck in com.puppycrawl.tools.checkstyle.checks.blocks Modifier and Type Class Description class
AvoidNestedBlocksCheck
Finds nested blocks (blocks that are used freely in the code).class
EmptyBlockCheck
Checks for empty blocks.class
EmptyCatchBlockCheck
Checks for empty catch blocks.class
LeftCurlyCheck
Checks for the placement of left curly braces ('{'
) for code blocks.class
NeedBracesCheck
Checks for braces around code blocks.class
RightCurlyCheck
Checks the placement of right curly braces ('}'
) for code blocks. -
Uses of AbstractCheck in com.puppycrawl.tools.checkstyle.checks.coding
Subclasses of AbstractCheck in com.puppycrawl.tools.checkstyle.checks.coding Modifier and Type Class Description class
AbstractSuperCheck
Abstract class for checking that an overriding method with no parameters invokes the super method.class
ArrayTrailingCommaCheck
Checks that array initialization contains a trailing comma.class
AvoidDoubleBraceInitializationCheck
Detects double brace initialization.class
AvoidInlineConditionalsCheck
Detects inline conditionals.class
AvoidNoArgumentSuperConstructorCallCheck
Checks if call to superclass constructor without arguments is present.class
ConstructorsDeclarationGroupingCheck
Checks that all constructors are grouped together.class
CovariantEqualsCheck
Checks that classes and records which define a covariantequals()
method also override methodequals(Object)
.class
DeclarationOrderCheck
Checks that the parts of a class, record, or interface declaration appear in the order suggested by the Code Conventions for the Java Programming Language.class
DefaultComesLastCheck
Check that thedefault
is after all the cases in aswitch
statement.class
EmptyStatementCheck
Detects empty statements (standalone";"
semicolon).class
EqualsAvoidNullCheck
Checks that any combination of String literals is on the left side of anequals()
comparison.class
EqualsHashCodeCheck
Checks that classes that either overrideequals()
orhashCode()
also overrides the other.class
ExplicitInitializationCheck
Checks if any class or object member is explicitly initialized to default for its type value (null
for object references, zero for numeric types andchar
andfalse
forboolean
.class
FallThroughCheck
Checks for fall-through inswitch
statements.class
FinalLocalVariableCheck
Checks that local variables that never have their values changed are declared final.class
HiddenFieldCheck
Checks that a local variable or a parameter does not shadow a field that is defined in the same class.class
IllegalCatchCheck
Checks that certain exception types do not appear in acatch
statement.class
IllegalInstantiationCheck
Checks for illegal instantiations where a factory method is preferred.class
IllegalThrowsCheck
Checks that specified types are not declared to be thrown.class
IllegalTokenCheck
Checks for illegal tokens.class
IllegalTokenTextCheck
Checks specified tokens text for matching an illegal pattern.class
IllegalTypeCheck
Checks that particular classes or interfaces are never used.class
InnerAssignmentCheck
Checks for assignments in subexpressions, such as inString s = Integer.toString(i = 2);
.class
MagicNumberCheck
Checks that there are no "magic numbers" where a magic number is a numeric literal that is not defined as a constant.class
MatchXpathCheck
Evaluates Xpath query and report violation on all matching AST nodes.class
MissingCtorCheck
Checks that classes (except abstract ones) define a constructor and don't rely on the default one.class
MissingNullCaseInSwitchCheck
Checks that a given switch statement or expression that use a reference type in its selector expression has anull
case label.class
MissingSwitchDefaultCheck
Checks that switch statement has adefault
clause.class
ModifiedControlVariableCheck
Checks that for loop control variables are not modified inside the for block.class
MultipleStringLiteralsCheck
Checks for multiple occurrences of the same string literal within a single file.class
MultipleVariableDeclarationsCheck
Checks that each variable declaration is in its own statement and on its own line.class
NestedForDepthCheck
Restricts nestedfor
blocks to a specified depth.class
NestedIfDepthCheck
Restricts nested if-else blocks to a specified depth.class
NestedTryDepthCheck
Restricts nested try-catch-finally blocks to a specified depth.class
NoArrayTrailingCommaCheck
Checks that array initialization do not contain a trailing comma.class
NoCloneCheck
Checks that the clone method is not overridden from the Object class.class
NoEnumTrailingCommaCheck
Checks that enum definition does not contain a trailing comma.class
NoFinalizerCheck
Checks that there is no methodfinalize
with zero parameters.class
OneStatementPerLineCheck
Checks that there is only one statement per line.class
OverloadMethodsDeclarationOrderCheck
Checks that overloaded methods are grouped together.class
PackageDeclarationCheck
Ensures that a class has a package declaration, and (optionally) whether the package name matches the directory name for the source file.class
ParameterAssignmentCheck
Disallows assignment of parameters.class
RequireThisCheck
Checks that references to instance variables and methods of the present object are explicitly of the form "this.varName" or "this.methodName(args)" and that those references don't rely on the default behavior when "this." is absent.class
ReturnCountCheck
Restricts the number of return statements in methods, constructors and lambda expressions.class
SimplifyBooleanExpressionCheck
Checks for over-complicated boolean expressions.class
SimplifyBooleanReturnCheck
Checks for over-complicated boolean return or yield statements.class
StringLiteralEqualityCheck
Checks that string literals are not used with==
or!=
.class
SuperCloneCheck
Checks that an overridingclone()
method invokessuper.clone()
.class
SuperFinalizeCheck
Checks that an overridingfinalize()
method invokessuper.finalize()
.class
UnnecessaryParenthesesCheck
Checks if unnecessary parentheses are used in a statement or expression.class
UnnecessarySemicolonAfterOuterTypeDeclarationCheck
Checks if unnecessary semicolon is used after type declaration.class
UnnecessarySemicolonAfterTypeMemberDeclarationCheck
Checks if unnecessary semicolon is used after type member declaration.class
UnnecessarySemicolonInEnumerationCheck
Checks if unnecessary semicolon is in enum definitions.class
UnnecessarySemicolonInTryWithResourcesCheck
Checks if unnecessary semicolon is used in last resource declaration.class
UnusedCatchParameterShouldBeUnnamedCheck
Ensures that catch parameters that are not used are declared as an unnamed variable.class
UnusedLambdaParameterShouldBeUnnamedCheck
Ensures that lambda parameters that are not used are declared as an unnamed variable.class
UnusedLocalVariableCheck
Checks that a local variable is declared and/or assigned, but not used.class
VariableDeclarationUsageDistanceCheck
Checks the distance between declaration of variable and its first usage.class
WhenShouldBeUsedCheck
Ensures thatwhen
is used instead of a singleif
statement inside a case block. -
Uses of AbstractCheck in com.puppycrawl.tools.checkstyle.checks.design
Subclasses of AbstractCheck in com.puppycrawl.tools.checkstyle.checks.design Modifier and Type Class Description class
DesignForExtensionCheck
Checks that classes are designed for extension (subclass creation).class
FinalClassCheck
Ensures that identifies classes that can be effectively declared as final are explicitly marked as final.class
HideUtilityClassConstructorCheck
Makes sure that utility classes (classes that contain only static methods or fields in their API) do not have a public constructor.class
InnerTypeLastCheck
Checks nested (internal) classes/interfaces are declared at the bottom of the primary (top-level) class after all init and static init blocks, method, constructor and field declarations.class
InterfaceIsTypeCheck
Implements Joshua Bloch, Effective Java, Item 17 - Use Interfaces only to define types.class
MutableExceptionCheck
Ensures that exception classes (classes with names conforming to some pattern and explicitly extending classes with names conforming to other pattern) are immutable, that is, that they have only final fields.class
OneTopLevelClassCheck
Checks that each top-level class, interface, enum or annotation resides in a source file of its own.class
SealedShouldHavePermitsListCheck
Checks that sealed classes and interfaces have a permits list.class
ThrowsCountCheck
Restricts throws statements to a specified count.class
VisibilityModifierCheck
Checks visibility of class members. -
Uses of AbstractCheck in com.puppycrawl.tools.checkstyle.checks.imports
Subclasses of AbstractCheck in com.puppycrawl.tools.checkstyle.checks.imports Modifier and Type Class Description class
AvoidStarImportCheck
Checks that there are no import statements that use the*
notation.class
AvoidStaticImportCheck
Checks that there are no static import statements.class
CustomImportOrderCheck
Checks that the groups of import declarations appear in the order specified by the user.class
IllegalImportCheck
Checks for imports from a set of illegal packages.class
ImportControlCheck
Controls what can be imported in each package and file.class
ImportOrderCheck
Checks the ordering/grouping of imports.class
RedundantImportCheck
Checks for redundant import statements.class
UnusedImportsCheck
Checks for unused import statements. -
Uses of AbstractCheck in com.puppycrawl.tools.checkstyle.checks.indentation
Subclasses of AbstractCheck in com.puppycrawl.tools.checkstyle.checks.indentation Modifier and Type Class Description class
CommentsIndentationCheck
Controls the indentation between comments and surrounding code.class
IndentationCheck
Checks correct indentation of Java code. -
Uses of AbstractCheck in com.puppycrawl.tools.checkstyle.checks.javadoc
Subclasses of AbstractCheck in com.puppycrawl.tools.checkstyle.checks.javadoc Modifier and Type Class Description class
AbstractJavadocCheck
Base class for Checks that process Javadoc comments.class
AtclauseOrderCheck
Checks the order of javadoc block-tags or javadoc tags.class
InvalidJavadocPositionCheck
Checks that Javadocs are located at the correct position.class
JavadocBlockTagLocationCheck
Checks that a javadoc block tag appears only at the beginning of a line, ignoring leading asterisks and white space.class
JavadocContentLocationCheck
Checks that the Javadoc content begins from the same position for all Javadoc comments in the project.class
JavadocLeadingAsteriskAlignCheck
Checks the alignment of leading asterisks in a Javadoc comment.class
JavadocMethodCheck
Checks the Javadoc of a method or constructor.class
JavadocMissingLeadingAsteriskCheck
Checks if the javadoc has leading asterisks on each line.class
JavadocMissingWhitespaceAfterAsteriskCheck
Checks that there is at least one whitespace after the leading asterisk.class
JavadocParagraphCheck
Checks the Javadoc paragraph.class
JavadocStyleCheck
Validates Javadoc comments to help ensure they are well formed.class
JavadocTagContinuationIndentationCheck
Checks the indentation of the continuation lines in block tags.class
JavadocTypeCheck
Checks the Javadoc comments for type definitions.class
JavadocVariableCheck
Checks that a variable has a Javadoc comment.class
MissingJavadocMethodCheck
Checks for missing Javadoc comments for a method or constructor.class
MissingJavadocPackageCheck
Checks for missing package definition Javadoc comments in package-info.java files.class
MissingJavadocTypeCheck
Checks for missing Javadoc comments for class, enum, interface, and annotation interface definitions.class
NonEmptyAtclauseDescriptionCheck
Checks that the block tag is followed by description.class
RequireEmptyLineBeforeBlockTagGroupCheck
Checks that one blank line before the block tag if it is present in Javadoc.class
SingleLineJavadocCheck
Checks that a Javadoc block can fit in a single-line and doesn't contain block tags.class
SummaryJavadocCheck
Checks that Javadoc summary sentence does not contain phrases that are not recommended to use.class
WriteTagCheck
Requires user defined Javadoc tag to be present in Javadoc comment with defined format. -
Uses of AbstractCheck in com.puppycrawl.tools.checkstyle.checks.metrics
Subclasses of AbstractCheck in com.puppycrawl.tools.checkstyle.checks.metrics Modifier and Type Class Description class
AbstractClassCouplingCheck
Base class for coupling calculation.class
BooleanExpressionComplexityCheck
Restricts the number of boolean operators (&&
,||
,&
,|
and^
) in an expression.class
ClassDataAbstractionCouplingCheck
Measures the number of distinct classes that are instantiated within the given class or record.class
ClassFanOutComplexityCheck
Checks the number of other types a given class/record/interface/enum/annotation relies on.class
CyclomaticComplexityCheck
Checks cyclomatic complexity against a specified limit.class
JavaNCSSCheck
Determines complexity of methods, classes and files by counting the Non Commenting Source Statements (NCSS).class
NPathComplexityCheck
Checks the NPATH complexity against a specified limit. -
Uses of AbstractCheck in com.puppycrawl.tools.checkstyle.checks.modifier
Subclasses of AbstractCheck in com.puppycrawl.tools.checkstyle.checks.modifier Modifier and Type Class Description class
ClassMemberImpliedModifierCheck
Checks for implicit modifiers on nested types in classes and records.class
InterfaceMemberImpliedModifierCheck
Checks for implicit modifiers on interface members and nested types.class
ModifierOrderCheck
Checks that the order of modifiers conforms to the suggestions in the Java Language specification, § 8.1.1, 8.3.1, 8.4.3 and 9.4.class
RedundantModifierCheck
Checks for redundant modifiers. -
Uses of AbstractCheck in com.puppycrawl.tools.checkstyle.checks.naming
Subclasses of AbstractCheck in com.puppycrawl.tools.checkstyle.checks.naming Modifier and Type Class Description class
AbbreviationAsWordInNameCheck
Validates abbreviations (consecutive capital letters) length in identifier name, it also allows to enforce camel case naming.class
AbstractAccessControlNameCheck
Abstract class for checking a class member (field/method)'s name conforms to a specified pattern.class
AbstractClassNameCheck
Ensures that the names of abstract classes conforming to some pattern and check thatabstract
modifier exists.class
AbstractNameCheck
Abstract class for checking that names conform to a specified format.class
CatchParameterNameCheck
Checks thatcatch
parameter names conform to a specified pattern.class
ClassTypeParameterNameCheck
Checks that class type parameter names conform to a specified pattern.class
ConstantNameCheck
Checks that constant names conform to a specified pattern.class
IllegalIdentifierNameCheck
Checks identifiers with a pattern for a set of illegal names, such as those that are restricted or contextual keywords.class
InterfaceTypeParameterNameCheck
Checks that interface type parameter names conform to a specified pattern.class
LambdaParameterNameCheck
Checks lambda parameter names.class
LocalFinalVariableNameCheck
Checks that local final variable names conform to a specified pattern.class
LocalVariableNameCheck
Checks that local, non-final
variable names conform to a specified pattern.class
MemberNameCheck
Checks that instance variable names conform to a specified pattern.class
MethodNameCheck
Checks that method names conform to a specified pattern.class
MethodTypeParameterNameCheck
Checks that method type parameter names conform to a specified pattern.class
PackageNameCheck
Checks that package names conform to a specified pattern.class
ParameterNameCheck
Checks that method parameter names conform to a specified pattern.class
PatternVariableNameCheck
Checks that pattern variable names conform to a specified pattern.class
RecordComponentNameCheck
Checks that record component names conform to a specified pattern.class
RecordTypeParameterNameCheck
Checks that record type parameter names conform to a specified pattern.class
StaticVariableNameCheck
Checks thatstatic
, non-final
variable names conform to a specified pattern.class
TypeNameCheck
Checks that type names conform to a specified pattern. -
Uses of AbstractCheck in com.puppycrawl.tools.checkstyle.checks.regexp
Subclasses of AbstractCheck in com.puppycrawl.tools.checkstyle.checks.regexp Modifier and Type Class Description class
RegexpCheck
Checks that a specified pattern exists, exists less than a set number of times, or does not exist in the file.class
RegexpSinglelineJavaCheck
Checks that a specified pattern matches a single-line in Java files. -
Uses of AbstractCheck in com.puppycrawl.tools.checkstyle.checks.sizes
Subclasses of AbstractCheck in com.puppycrawl.tools.checkstyle.checks.sizes Modifier and Type Class Description class
AnonInnerLengthCheck
Checks for long anonymous inner classes.class
ExecutableStatementCountCheck
Restricts the number of executable statements to a specified limit.class
LambdaBodyLengthCheck
Checks lambda body length.class
MethodCountCheck
Checks the number of methods declared in each type declaration by access modifier or total count.class
MethodLengthCheck
Checks for long methods and constructors.class
OuterTypeNumberCheck
Checks for the number of types declared at the outer (or root) level in a file.class
ParameterNumberCheck
Checks the number of parameters of a method or constructor.class
RecordComponentNumberCheck
Checks the number of record components in the header of a record definition. -
Uses of AbstractCheck in com.puppycrawl.tools.checkstyle.checks.whitespace
Subclasses of AbstractCheck in com.puppycrawl.tools.checkstyle.checks.whitespace Modifier and Type Class Description class
AbstractParenPadCheck
Abstract class for checking the padding of parentheses.class
EmptyForInitializerPadCheck
Checks the padding of an empty for initializer; that is whether a white space is required at an empty for initializer, or such white space is forbidden.class
EmptyForIteratorPadCheck
Checks the padding of an empty for iterator; that is whether a white space is required at an empty for iterator, or such white space is forbidden.class
EmptyLineSeparatorCheck
Checks for empty line separators before package, all import declarations, fields, constructors, methods, nested classes, static initializers and instance initializers.class
GenericWhitespaceCheck
Checks that the whitespace around the Generic tokens (angle brackets) "<" and ">" are correct to the typical convention.class
MethodParamPadCheck
Checks the padding between the identifier of a method definition, constructor definition, method call, constructor invocation, record, or record pattern; and the left parenthesis of the parameter list.class
NoLineWrapCheck
Checks that chosen statements are not line-wrapped.class
NoWhitespaceAfterCheck
Checks that there is no whitespace after a token.class
NoWhitespaceBeforeCaseDefaultColonCheck
Checks that there is no whitespace before the colon in a switch block.class
NoWhitespaceBeforeCheck
Checks that there is no whitespace before a token.class
OperatorWrapCheck
Checks the policy on how to wrap lines on operators.class
ParenPadCheck
Checks the policy on the padding of parentheses; that is whether a space is required after a left parenthesis and before a right parenthesis, or such spaces are forbidden.class
SeparatorWrapCheck
Checks line wrapping with separators.class
SingleSpaceSeparatorCheck
Checks that non-whitespace characters are separated by no more than one whitespace.class
TypecastParenPadCheck
Checks the policy on the padding of parentheses for typecasts.class
WhitespaceAfterCheck
Checks that a token is followed by whitespace, with the exception that it does not check for whitespace after the semicolon of an empty for iterator.class
WhitespaceAroundCheck
Checks that a token is surrounded by whitespace. -
Uses of AbstractCheck in com.puppycrawl.tools.checkstyle.meta
Subclasses of AbstractCheck in com.puppycrawl.tools.checkstyle.meta Modifier and Type Class Description class
JavadocMetadataScraper
Class for scraping module metadata from the corresponding class' class-level javadoc. -
Uses of AbstractCheck in com.puppycrawl.tools.checkstyle.site
Subclasses of AbstractCheck in com.puppycrawl.tools.checkstyle.site Modifier and Type Class Description class
ClassAndPropertiesSettersJavadocScraper
Class for scraping class javadoc and all property setter javadocs from the given checkstyle module.
-