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. -
-
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 java.util.Set<AbstractCheck>TreeWalker. commentChecksRegistered comment checks.private java.util.Set<AbstractCheck>TreeWalker. ordinaryChecksRegistered ordinary checks, that don't use comment nodes.private java.util.Map<java.lang.Integer,java.util.Set<AbstractCheck>>TreeWalker. tokenToCommentChecksMaps from token name to comment checks.private java.util.Map<java.lang.Integer,java.util.Set<AbstractCheck>>TreeWalker. tokenToOrdinaryChecksMaps 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 java.util.SortedSet<AbstractCheck>TreeWalker. createNewCheckSortedSet()Creates a newSortedSetwith a deterministic order based on the Check's name before the default ordering.private java.util.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 voidTreeWalker. registerCheck(int tokenId, AbstractCheck check)Register a check for a specified token id.private voidTreeWalker. 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 classArrayTypeStyleCheckChecks the style of array type definitions.classAvoidEscapedUnicodeCharactersCheckRestricts using Unicode escapes (such as \u221e).classDescendantTokenCheckChecks for restricted tokens beneath other tokens.classFinalParametersCheckChecks that parameters for methods, constructors, catch and for-each blocks are final.classNoCodeInFileCheckChecks whether file contains code.classOuterTypeFilenameCheckChecks that the outer type name and the file name match.classSuppressWarningsHolderMaintains a set of check suppressions from@SuppressWarningsannotations.classTodoCommentCheckChecks forTODO:comments.classTrailingCommentCheckThe check to ensure that lines with code do not end with comment.classUncommentedMainCheckDetects uncommentedmainmethods.classUpperEllCheckChecks 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 classAnnotationLocationCheckChecks location of annotation on language elements.classAnnotationOnSameLineCheckChecks that annotations are located on the same line with their targets.classAnnotationUseStyleCheckChecks the style of elements in annotations.classMissingDeprecatedCheckVerifies that the annotation@Deprecatedand the Javadoc tag@deprecatedare both present when either of them is present.classMissingOverrideCheckVerifies that the@Overrideannotation is present when the@inheritDocjavadoc tag is present.classPackageAnnotationCheckChecks that all package annotations are in the package-info.java file.classSuppressWarningsCheckAllows to specify what warnings that@SuppressWarningsis 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 classAvoidNestedBlocksCheckFinds nested blocks (blocks that are used freely in the code).classEmptyBlockCheckChecks for empty blocks.classEmptyCatchBlockCheckChecks for empty catch blocks.classLeftCurlyCheckChecks for the placement of left curly braces ('{') for code blocks.classNeedBracesCheckChecks for braces around code blocks.classRightCurlyCheckChecks 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 classAbstractSuperCheckAbstract class for checking that an overriding method with no parameters invokes the super method.classArrayTrailingCommaCheckChecks that array initialization contains a trailing comma.classAvoidDoubleBraceInitializationCheckDetects double brace initialization.classAvoidInlineConditionalsCheckDetects inline conditionals.classAvoidNoArgumentSuperConstructorCallCheckChecks if call to superclass constructor without arguments is present.classCovariantEqualsCheckChecks that classes and records which define a covariantequals()method also override methodequals(Object).classDeclarationOrderCheckChecks that the parts of a class, record, or interface declaration appear in the order suggested by the Code Conventions for the Java Programming Language.classDefaultComesLastCheckCheck that thedefaultis after all the cases in aswitchstatement.classEmptyStatementCheckDetects empty statements (standalone";"semicolon).classEqualsAvoidNullCheckChecks that any combination of String literals is on the left side of anequals()comparison.classEqualsHashCodeCheckChecks that classes that either overrideequals()orhashCode()also overrides the other.classExplicitInitializationCheckChecks if any class or object member is explicitly initialized to default for its type value (nullfor object references, zero for numeric types andcharandfalseforboolean.classFallThroughCheckChecks for fall-through inswitchstatements.classFinalLocalVariableCheckChecks that local variables that never have their values changed are declared final.classHiddenFieldCheckChecks that a local variable or a parameter does not shadow a field that is defined in the same class.classIllegalCatchCheckChecks that certain exception types do not appear in acatchstatement.classIllegalInstantiationCheckChecks for illegal instantiations where a factory method is preferred.classIllegalThrowsCheckChecks that specified types are not declared to be thrown.classIllegalTokenCheckChecks for illegal tokens.classIllegalTokenTextCheckChecks specified tokens text for matching an illegal pattern.classIllegalTypeCheckChecks that particular classes or interfaces are never used.classInnerAssignmentCheckChecks for assignments in subexpressions, such as inString s = Integer.toString(i = 2);.classMagicNumberCheckChecks that there are no "magic numbers" where a magic number is a numeric literal that is not defined as a constant.classMatchXpathCheckEvaluates Xpath query and report violation on all matching AST nodes.classMissingCtorCheckChecks that classes (except abstract ones) define a constructor and don't rely on the default one.classMissingSwitchDefaultCheckChecks that switch statement has adefaultclause.classModifiedControlVariableCheckChecks that for loop control variables are not modified inside the for block.classMultipleStringLiteralsCheckChecks for multiple occurrences of the same string literal within a single file.classMultipleVariableDeclarationsCheckChecks that each variable declaration is in its own statement and on its own line.classNestedForDepthCheckRestricts nestedforblocks to a specified depth.classNestedIfDepthCheckRestricts nested if-else blocks to a specified depth.classNestedTryDepthCheckRestricts nested try-catch-finally blocks to a specified depth.classNoArrayTrailingCommaCheckChecks that array initialization do not contain a trailing comma.classNoCloneCheckChecks that the clone method is not overridden from the Object class.classNoEnumTrailingCommaCheckChecks that enum definition does not contain a trailing comma.classNoFinalizerCheckChecks that there is no methodfinalizewith zero parameters.classOneStatementPerLineCheckChecks that there is only one statement per line.classOverloadMethodsDeclarationOrderCheckChecks that overloaded methods are grouped together.classPackageDeclarationCheckEnsures that a class has a package declaration, and (optionally) whether the package name matches the directory name for the source file.classParameterAssignmentCheckDisallows assignment of parameters.classRequireThisCheckChecks 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.classReturnCountCheckRestricts the number of return statements in methods, constructors and lambda expressions.classSimplifyBooleanExpressionCheckChecks for over-complicated boolean expressions.classSimplifyBooleanReturnCheckChecks for over-complicated boolean return statements.classStringLiteralEqualityCheckChecks that string literals are not used with==or!=.classSuperCloneCheckChecks that an overridingclone()method invokessuper.clone().classSuperFinalizeCheckChecks that an overridingfinalize()method invokessuper.finalize().classUnnecessaryParenthesesCheckChecks if unnecessary parentheses are used in a statement or expression.classUnnecessarySemicolonAfterOuterTypeDeclarationCheckChecks if unnecessary semicolon is used after type declaration.classUnnecessarySemicolonAfterTypeMemberDeclarationCheckChecks if unnecessary semicolon is used after type member declaration.classUnnecessarySemicolonInEnumerationCheckChecks if unnecessary semicolon is in enum definitions.classUnnecessarySemicolonInTryWithResourcesCheckChecks if unnecessary semicolon is used in last resource declaration.classUnusedLocalVariableCheckChecks that a local variable is declared and/or assigned, but not used.classVariableDeclarationUsageDistanceCheckChecks the distance between declaration of variable and its first usage. -
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 classDesignForExtensionCheckChecks that classes are designed for extension (subclass creation).classFinalClassCheckChecks that a class that has only private constructors and has no descendant classes is declared as final.classHideUtilityClassConstructorCheckMakes sure that utility classes (classes that contain only static methods or fields in their API) do not have a public constructor.classInnerTypeLastCheckChecks 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.classInterfaceIsTypeCheckImplements Joshua Bloch, Effective Java, Item 17 - Use Interfaces only to define types.classMutableExceptionCheckEnsures 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.classOneTopLevelClassCheckChecks that each top-level class, interface, enum or annotation resides in a source file of its own.classThrowsCountCheckRestricts throws statements to a specified count.classVisibilityModifierCheckChecks 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 classAvoidStarImportCheckChecks that there are no import statements that use the*notation.classAvoidStaticImportCheckChecks that there are no static import statements.classCustomImportOrderCheckChecks that the groups of import declarations appear in the order specified by the user.classIllegalImportCheckChecks for imports from a set of illegal packages.classImportControlCheckControls what can be imported in each package and file.classImportOrderCheckChecks the ordering/grouping of imports.classRedundantImportCheckChecks for redundant import statements.classUnusedImportsCheckChecks 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 classCommentsIndentationCheckControls the indentation between comments and surrounding code.classIndentationCheckChecks 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 classAbstractJavadocCheckBase class for Checks that process Javadoc comments.classAtclauseOrderCheckChecks the order of javadoc block-tags or javadoc tags.classInvalidJavadocPositionCheckChecks that Javadocs are located at the correct position.classJavadocBlockTagLocationCheckChecks that a javadoc block tag appears only at the beginning of a line, ignoring leading asterisks and white space.classJavadocContentLocationCheckChecks that the Javadoc content begins from the same position for all Javadoc comments in the project.classJavadocMethodCheckChecks the Javadoc of a method or constructor.classJavadocMissingLeadingAsteriskCheckChecks if the javadoc has leading asterisks on each line.classJavadocMissingWhitespaceAfterAsteriskCheckChecks that there is at least one whitespace after the leading asterisk.classJavadocParagraphCheckChecks the Javadoc paragraph.classJavadocStyleCheckValidates Javadoc comments to help ensure they are well formed.classJavadocTagContinuationIndentationCheckChecks the indentation of the continuation lines in block tags.classJavadocTypeCheckChecks the Javadoc comments for type definitions.classJavadocVariableCheckChecks that a variable has a Javadoc comment.classMissingJavadocMethodCheckChecks for missing Javadoc comments for a method or constructor.classMissingJavadocPackageCheckChecks for missing Javadoc comments in package-info.java files.classMissingJavadocTypeCheckChecks for missing Javadoc comments for class, enum, interface, and annotation interface definitions.classNonEmptyAtclauseDescriptionCheckChecks that the block tag is followed by description.classRequireEmptyLineBeforeBlockTagGroupCheckChecks that one blank line before the block tag if it is present in Javadoc.classSingleLineJavadocCheckChecks that a Javadoc block can fit in a single line and doesn't contain block tags.classSummaryJavadocCheckChecks that Javadoc summary sentence does not contain phrases that are not recommended to use.classWriteTagCheckRequires 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 classAbstractClassCouplingCheckBase class for coupling calculation.classBooleanExpressionComplexityCheckRestricts the number of boolean operators (&&,||,&,|and^) in an expression.classClassDataAbstractionCouplingCheckMeasures the number of instantiations of other classes within the given class or record.classClassFanOutComplexityCheckChecks the number of other types a given class/record/interface/enum/annotation relies on.classCyclomaticComplexityCheckChecks cyclomatic complexity against a specified limit.classJavaNCSSCheckDetermines complexity of methods, classes and files by counting the Non Commenting Source Statements (NCSS).classNPathComplexityCheckChecks 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 classClassMemberImpliedModifierCheckChecks for implicit modifiers on nested types in classes and records.classInterfaceMemberImpliedModifierCheckChecks for implicit modifiers on interface members and nested types.classModifierOrderCheckChecks 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.classRedundantModifierCheckChecks 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 classAbbreviationAsWordInNameCheckValidates abbreviations (consecutive capital letters) length in identifier name, it also allows to enforce camel case naming.classAbstractAccessControlNameCheckAbstract class for checking a class member (field/method)'s name conforms to a specified pattern.classAbstractClassNameCheckEnsures that the names of abstract classes conforming to some pattern and check thatabstractmodifier exists.classAbstractNameCheckAbstract class for checking that names conform to a specified format.classCatchParameterNameCheckChecks thatcatchparameter names conform to a specified pattern.classClassTypeParameterNameCheckChecks that class type parameter names conform to a specified pattern.classConstantNameCheckChecks that constant names conform to a specified pattern.classIllegalIdentifierNameCheckChecks identifiers with a pattern for a set of illegal names, such as those that are restricted or contextual keywords.classInterfaceTypeParameterNameCheckChecks that interface type parameter names conform to a specified pattern.classLambdaParameterNameCheckChecks lambda parameter names.classLocalFinalVariableNameCheckChecks that local final variable names conform to a specified pattern.classLocalVariableNameCheckChecks that local, non-finalvariable names conform to a specified pattern.classMemberNameCheckChecks that instance variable names conform to a specified pattern.classMethodNameCheckChecks that method names conform to a specified pattern.classMethodTypeParameterNameCheckChecks that method type parameter names conform to a specified pattern.classPackageNameCheckChecks that package names conform to a specified pattern.classParameterNameCheckChecks that method parameter names conform to a specified pattern.classPatternVariableNameCheckChecks that pattern variable names conform to a specified pattern.classRecordComponentNameCheckChecks that record component names conform to a specified pattern.classRecordTypeParameterNameCheckChecks that record type parameter names conform to a specified pattern.classStaticVariableNameCheckChecks thatstatic, non-finalvariable names conform to a specified pattern.classTypeNameCheckChecks 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 classRegexpCheckChecks that a specified pattern exists, exists less than a set number of times, or does not exist in the file.classRegexpSinglelineJavaCheckChecks 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 classAnonInnerLengthCheckChecks for long anonymous inner classes.classExecutableStatementCountCheckRestricts the number of executable statements to a specified limit.classLambdaBodyLengthCheckChecks lambda body length.classMethodCountCheckChecks the number of methods declared in each type declaration by access modifier or total count.classMethodLengthCheckChecks for long methods and constructors.classOuterTypeNumberCheckChecks for the number of types declared at the outer (or root) level in a file.classParameterNumberCheckChecks the number of parameters of a method or constructor.classRecordComponentNumberCheckChecks 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 classAbstractParenPadCheckAbstract class for checking the padding of parentheses.classEmptyForInitializerPadCheckChecks 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.classEmptyForIteratorPadCheckChecks 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.classEmptyLineSeparatorCheckChecks for empty line separators before package, all import declarations, fields, constructors, methods, nested classes, static initializers and instance initializers.classGenericWhitespaceCheckChecks that the whitespace around the Generic tokens (angle brackets) "<" and ">" are correct to the typical convention.classMethodParamPadCheckChecks the padding between the identifier of a method definition, constructor definition, method call, or constructor invocation; and the left parenthesis of the parameter list.classNoLineWrapCheckChecks that chosen statements are not line-wrapped.classNoWhitespaceAfterCheckChecks that there is no whitespace after a token.classNoWhitespaceBeforeCaseDefaultColonCheckChecks that there is no whitespace before the colon in a switch block.classNoWhitespaceBeforeCheckChecks that there is no whitespace before a token.classOperatorWrapCheckChecks the policy on how to wrap lines on operators.classParenPadCheckChecks 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.classSeparatorWrapCheckChecks line wrapping with separators.classSingleSpaceSeparatorCheckChecks that non-whitespace characters are separated by no more than one whitespace.classTypecastParenPadCheckChecks the policy on the padding of parentheses for typecasts.classWhitespaceAfterCheckChecks 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.classWhitespaceAroundCheckChecks 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 classJavadocMetadataScraperClass for scraping module metadata from the corresponding class' class-level javadoc.
-