Uses of Interface
com.puppycrawl.tools.checkstyle.api.DetailAST
Packages that use DetailAST
Package
Description
Contains the implementation of the Checkstyle framework.
Contains the core API to be used to implement checks.
Contains the checks that are bundled with the main distribution.
Contains the Annotation checks that are
bundled with the main distribution.
Contains the Block checks that are
bundled with the main distribution.
Contains the Coding checks that are
bundled with the main distribution.
Contains the Class Design checks that
are bundled with the main distribution.
Contains the Imports checks that are
bundled with the main distribution.
Contains all classes required for the
indentation check.
Contains the Javadoc checks that are bundled with the main distribution.
Contains the Metrics checks that are
bundled with the main distribution.
Contains the modifier checks that are bundled with the main distribution.
Contains the Naming conventions checks
that are bundled with the main distribution.
Contains the regular expression checks that are bundled with the main
distribution.
Contains the Size Violations checks
that are bundled with the main distribution.
Contains the Whitespace checks that
are bundled with the main distribution.
User interface classes for CheckStyle.
Contains utils classes for checkstyle.
Contains the nodes implementations for XPATH queries and query generator.
-
Uses of DetailAST in com.puppycrawl.tools.checkstyle
Classes in com.puppycrawl.tools.checkstyle that implement DetailASTMethods in com.puppycrawl.tools.checkstyle that return DetailASTModifier and TypeMethodDescriptionstatic DetailAST
JavaParser.appendHiddenCommentNodes
(DetailAST root) Appends comment nodes to existing AST.DetailAstImpl.findFirstToken
(int type) DetailAstImpl.getLastChild()
DetailAstImpl.getParent()
DetailAstImpl.getPreviousSibling()
TreeWalkerAuditEvent.getRootAst()
Gets the root element of the AST tree.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.Methods in com.puppycrawl.tools.checkstyle with parameters of type DetailASTModifier and TypeMethodDescriptionvoid
DetailAstImpl.addNextSibling
(DetailAST ast) Add next sibling.void
DetailAstImpl.addPreviousSibling
(DetailAST ast) Add previous sibling.static DetailAST
JavaParser.appendHiddenCommentNodes
(DetailAST root) Appends comment nodes to existing AST.static DetailNode
DetailNodeTreeStringPrinter.parseJavadocAsDetailNode
(DetailAST blockComment) Parse block comment DetailAST as Javadoc DetailNode tree.JavadocDetailNodeParser.parseJavadocAsDetailNode
(DetailAST javadocCommentAst) Parses Javadoc comment as DetailNode tree.static String
AstTreeStringPrinter.printBranch
(DetailAST node) Print branch info from root down to givennode
.Constructors in com.puppycrawl.tools.checkstyle with parameters of type DetailASTModifierConstructorDescriptionTreeWalkerAuditEvent
(FileContents fileContents, String fileName, LocalizedMessage localizedMessage, DetailAST rootAst) Creates a newTreeWalkerAuditEvent
instance. -
Uses of DetailAST in com.puppycrawl.tools.checkstyle.api
Methods in com.puppycrawl.tools.checkstyle.api that return DetailASTModifier and TypeMethodDescriptionDetailAST.findFirstToken
(int type) Returns the first child token that makes a specified type.FullIdent.getDetailAst()
Gets the topmost leftmost DetailAST for this FullIdent.DetailAST.getFirstChild()
Get the first child of this AST.DetailAST.getLastChild()
Gets the last child node.DetailAST.getNextSibling()
Get the next sibling in line after this one.DetailAST.getParent()
Returns the parent token.DetailAST.getPreviousSibling()
Returns the previous sibling or null if no such sibling exists.Methods in com.puppycrawl.tools.checkstyle.api with parameters of type DetailASTModifier and TypeMethodDescriptionvoid
Called before the starting to process a tree.static FullIdent
FullIdent.createFullIdent
(DetailAST ast) Creates a new FullIdent starting from the specified node.static FullIdent
FullIdent.createFullIdentBelow
(DetailAST ast) Creates a new FullIdent starting from the child of the specified node.void
AbstractCheck.finishTree
(DetailAST rootAST) Called after finished processing a tree.void
AbstractCheck.leaveToken
(DetailAST ast) Called after all the child nodes have been process.final void
Helper method to log a LocalizedMessage.void
AbstractCheck.visitToken
(DetailAST ast) Called to process a token. -
Uses of DetailAST in com.puppycrawl.tools.checkstyle.checks
Methods in com.puppycrawl.tools.checkstyle.checks with parameters of type DetailASTModifier and TypeMethodDescriptionvoid
void
void
void
void
void
NoCodeInFileCheck.finishTree
(DetailAST ast) void
OuterTypeFilenameCheck.finishTree
(DetailAST rootAST) void
UncommentedMainCheck.leaveToken
(DetailAST ast) void
ArrayTypeStyleCheck.visitToken
(DetailAST ast) void
AvoidEscapedUnicodeCharactersCheck.visitToken
(DetailAST ast) void
DescendantTokenCheck.visitToken
(DetailAST ast) void
FinalParametersCheck.visitToken
(DetailAST ast) void
OuterTypeFilenameCheck.visitToken
(DetailAST ast) void
SuppressWarningsHolder.visitToken
(DetailAST ast) void
TodoCommentCheck.visitToken
(DetailAST ast) void
TrailingCommentCheck.visitToken
(DetailAST ast) void
UncommentedMainCheck.visitToken
(DetailAST ast) void
UpperEllCheck.visitToken
(DetailAST ast) -
Uses of DetailAST in com.puppycrawl.tools.checkstyle.checks.annotation
Methods in com.puppycrawl.tools.checkstyle.checks.annotation with parameters of type DetailASTModifier and TypeMethodDescriptionvoid
AnnotationLocationCheck.visitToken
(DetailAST ast) void
AnnotationOnSameLineCheck.visitToken
(DetailAST ast) void
AnnotationUseStyleCheck.visitToken
(DetailAST ast) void
MissingOverrideCheck.visitToken
(DetailAST ast) void
PackageAnnotationCheck.visitToken
(DetailAST ast) void
SuppressWarningsCheck.visitToken
(DetailAST ast) -
Uses of DetailAST in com.puppycrawl.tools.checkstyle.checks.blocks
Methods in com.puppycrawl.tools.checkstyle.checks.blocks with parameters of type DetailASTModifier and TypeMethodDescriptionvoid
AvoidNestedBlocksCheck.visitToken
(DetailAST ast) void
EmptyBlockCheck.visitToken
(DetailAST ast) void
EmptyCatchBlockCheck.visitToken
(DetailAST ast) void
LeftCurlyCheck.visitToken
(DetailAST ast) We cannot reduce the number of branches in this switch statement, since many tokens require specific methods to find the first left curly.void
NeedBracesCheck.visitToken
(DetailAST ast) void
RightCurlyCheck.visitToken
(DetailAST ast) -
Uses of DetailAST in com.puppycrawl.tools.checkstyle.checks.coding
Methods in com.puppycrawl.tools.checkstyle.checks.coding with parameters of type DetailASTModifier and TypeMethodDescriptionvoid
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
EqualsAvoidNullCheck.finishTree
(DetailAST ast) void
EqualsHashCodeCheck.finishTree
(DetailAST rootAST) void
IllegalInstantiationCheck.finishTree
(DetailAST rootAST) void
MultipleStringLiteralsCheck.finishTree
(DetailAST rootAST) void
PackageDeclarationCheck.finishTree
(DetailAST ast) void
AbstractSuperCheck.leaveToken
(DetailAST ast) void
DeclarationOrderCheck.leaveToken
(DetailAST ast) void
EqualsAvoidNullCheck.leaveToken
(DetailAST ast) void
FinalLocalVariableCheck.leaveToken
(DetailAST ast) void
HiddenFieldCheck.leaveToken
(DetailAST ast) void
ModifiedControlVariableCheck.leaveToken
(DetailAST ast) void
NestedForDepthCheck.leaveToken
(DetailAST ast) void
NestedIfDepthCheck.leaveToken
(DetailAST literalIf) void
NestedTryDepthCheck.leaveToken
(DetailAST literalTry) void
OneStatementPerLineCheck.leaveToken
(DetailAST ast) void
ParameterAssignmentCheck.leaveToken
(DetailAST ast) void
RequireThisCheck.leaveToken
(DetailAST ast) void
ReturnCountCheck.leaveToken
(DetailAST ast) void
UnnecessaryParenthesesCheck.leaveToken
(DetailAST ast) void
AbstractSuperCheck.visitToken
(DetailAST ast) void
ArrayTrailingCommaCheck.visitToken
(DetailAST arrayInit) void
AvoidDoubleBraceInitializationCheck.visitToken
(DetailAST ast) void
AvoidInlineConditionalsCheck.visitToken
(DetailAST ast) void
AvoidNoArgumentSuperConstructorCallCheck.visitToken
(DetailAST ast) void
CovariantEqualsCheck.visitToken
(DetailAST ast) void
DeclarationOrderCheck.visitToken
(DetailAST ast) void
DefaultComesLastCheck.visitToken
(DetailAST ast) void
EmptyStatementCheck.visitToken
(DetailAST ast) void
EqualsAvoidNullCheck.visitToken
(DetailAST ast) void
EqualsHashCodeCheck.visitToken
(DetailAST ast) void
ExplicitInitializationCheck.visitToken
(DetailAST ast) void
FallThroughCheck.visitToken
(DetailAST ast) void
FinalLocalVariableCheck.visitToken
(DetailAST ast) void
HiddenFieldCheck.visitToken
(DetailAST ast) void
IllegalCatchCheck.visitToken
(DetailAST detailAST) void
IllegalInstantiationCheck.visitToken
(DetailAST ast) void
IllegalThrowsCheck.visitToken
(DetailAST detailAST) void
IllegalTokenCheck.visitToken
(DetailAST ast) void
IllegalTokenTextCheck.visitToken
(DetailAST ast) void
IllegalTypeCheck.visitToken
(DetailAST ast) void
InnerAssignmentCheck.visitToken
(DetailAST ast) void
MagicNumberCheck.visitToken
(DetailAST ast) void
MissingCtorCheck.visitToken
(DetailAST ast) void
MissingSwitchDefaultCheck.visitToken
(DetailAST ast) void
ModifiedControlVariableCheck.visitToken
(DetailAST ast) void
MultipleStringLiteralsCheck.visitToken
(DetailAST ast) void
MultipleVariableDeclarationsCheck.visitToken
(DetailAST ast) void
NestedForDepthCheck.visitToken
(DetailAST ast) void
NestedIfDepthCheck.visitToken
(DetailAST literalIf) void
NestedTryDepthCheck.visitToken
(DetailAST literalTry) void
NoArrayTrailingCommaCheck.visitToken
(DetailAST arrayInit) void
NoCloneCheck.visitToken
(DetailAST ast) void
NoEnumTrailingCommaCheck.visitToken
(DetailAST detailAST) void
NoFinalizerCheck.visitToken
(DetailAST ast) void
OneStatementPerLineCheck.visitToken
(DetailAST ast) void
OverloadMethodsDeclarationOrderCheck.visitToken
(DetailAST ast) void
PackageDeclarationCheck.visitToken
(DetailAST ast) void
ParameterAssignmentCheck.visitToken
(DetailAST ast) void
RequireThisCheck.visitToken
(DetailAST ast) void
ReturnCountCheck.visitToken
(DetailAST ast) void
SimplifyBooleanExpressionCheck.visitToken
(DetailAST ast) void
SimplifyBooleanReturnCheck.visitToken
(DetailAST ast) void
StringLiteralEqualityCheck.visitToken
(DetailAST ast) void
UnnecessaryParenthesesCheck.visitToken
(DetailAST ast) void
UnnecessarySemicolonAfterOuterTypeDeclarationCheck.visitToken
(DetailAST ast) void
UnnecessarySemicolonAfterTypeMemberDeclarationCheck.visitToken
(DetailAST ast) void
UnnecessarySemicolonInEnumerationCheck.visitToken
(DetailAST ast) void
UnnecessarySemicolonInTryWithResourcesCheck.visitToken
(DetailAST ast) void
VariableDeclarationUsageDistanceCheck.visitToken
(DetailAST ast) -
Uses of DetailAST in com.puppycrawl.tools.checkstyle.checks.design
Methods in com.puppycrawl.tools.checkstyle.checks.design with parameters of type DetailASTModifier and TypeMethodDescriptionvoid
void
void
void
void
FinalClassCheck.leaveToken
(DetailAST ast) void
InnerTypeLastCheck.leaveToken
(DetailAST ast) void
MutableExceptionCheck.leaveToken
(DetailAST ast) void
DesignForExtensionCheck.visitToken
(DetailAST ast) void
FinalClassCheck.visitToken
(DetailAST ast) void
HideUtilityClassConstructorCheck.visitToken
(DetailAST ast) void
InnerTypeLastCheck.visitToken
(DetailAST ast) void
InterfaceIsTypeCheck.visitToken
(DetailAST ast) void
MutableExceptionCheck.visitToken
(DetailAST ast) void
ThrowsCountCheck.visitToken
(DetailAST ast) void
VisibilityModifierCheck.visitToken
(DetailAST ast) -
Uses of DetailAST in com.puppycrawl.tools.checkstyle.checks.imports
Methods in com.puppycrawl.tools.checkstyle.checks.imports with parameters of type DetailASTModifier and TypeMethodDescriptionvoid
void
void
void
void
void
CustomImportOrderCheck.finishTree
(DetailAST rootAST) void
UnusedImportsCheck.finishTree
(DetailAST rootAST) void
AvoidStarImportCheck.visitToken
(DetailAST ast) void
AvoidStaticImportCheck.visitToken
(DetailAST ast) void
CustomImportOrderCheck.visitToken
(DetailAST ast) void
IllegalImportCheck.visitToken
(DetailAST ast) void
ImportControlCheck.visitToken
(DetailAST ast) void
ImportOrderCheck.visitToken
(DetailAST ast) void
RedundantImportCheck.visitToken
(DetailAST ast) void
UnusedImportsCheck.visitToken
(DetailAST ast) -
Uses of DetailAST in com.puppycrawl.tools.checkstyle.checks.indentation
Methods in com.puppycrawl.tools.checkstyle.checks.indentation that return DetailASTModifier and TypeMethodDescriptionDetailAstSet.firstLine()
The first line in set of ast.DetailAstSet.getAst
(int lineNum) Get the ast corresponding to line number.protected static DetailAST
AbstractExpressionHandler.getFirstAst
(DetailAST ast, DetailAST tree) Get the first ast for given expression.static DetailAST
AbstractExpressionHandler.getFirstToken
(DetailAST ast) Searches in given sub-tree (including given node) for the token which represents first symbol for this sub-tree in file.protected DetailAST
ArrayInitHandler.getLeftCurly()
protected DetailAST
BlockParentHandler.getLeftCurly()
Get the left curly brace portion of the expression we are handling.protected DetailAST
ClassDefHandler.getLeftCurly()
protected DetailAST
ObjectBlockHandler.getLeftCurly()
protected DetailAST
SlistHandler.getLeftCurly()
protected DetailAST
SwitchHandler.getLeftCurly()
protected DetailAST
ArrayInitHandler.getListChild()
protected DetailAST
BlockParentHandler.getListChild()
Get the child element representing the list of statements.protected DetailAST
ClassDefHandler.getListChild()
protected DetailAST
ObjectBlockHandler.getListChild()
protected DetailAST
SlistHandler.getListChild()
protected DetailAST
SwitchHandler.getListChild()
protected final DetailAST
AbstractExpressionHandler.getMainAst()
Accessor for the MainAst attribute.protected DetailAST
BlockParentHandler.getNonListChild()
Get the child element that is not a list of statements.protected DetailAST
ElseHandler.getNonListChild()
protected DetailAST
SwitchHandler.getNonListChild()
protected DetailAST
ArrayInitHandler.getRightCurly()
protected DetailAST
BlockParentHandler.getRightCurly()
Get the right curly brace portion of the expression we are handling.protected DetailAST
ClassDefHandler.getRightCurly()
protected DetailAST
ObjectBlockHandler.getRightCurly()
protected DetailAST
SlistHandler.getRightCurly()
protected DetailAST
SwitchHandler.getRightCurly()
protected DetailAST
ArrayInitHandler.getTopLevelAst()
protected DetailAST
BlockParentHandler.getTopLevelAst()
Get the top level expression being managed by this handler.protected DetailAST
ClassDefHandler.getTopLevelAst()
protected DetailAST
MethodDefHandler.getTopLevelAst()
protected DetailAST
ObjectBlockHandler.getTopLevelAst()
protected DetailAST
SlistHandler.getTopLevelAst()
Methods in com.puppycrawl.tools.checkstyle.checks.indentation with parameters of type DetailASTModifier and TypeMethodDescriptionvoid
Add ast to the set of ast.void
protected final void
AbstractExpressionHandler.checkChildren
(DetailAST parentNode, int[] tokenTypes, IndentLevel startIndent, boolean firstLineMatches, boolean allowNesting) Check the indent level of the children of the specified parent expression.protected final void
AbstractExpressionHandler.checkExpressionSubtree
(DetailAST tree, IndentLevel indentLevel, boolean firstLineMatches, boolean allowNesting) Check the indentation level for an expression subtree.void
LineWrappingHandler.checkIndentation
(DetailAST firstNode, DetailAST lastNode) Checks line wrapping into expressions and definitions using property 'lineWrappingIndentation'.void
LineWrappingHandler.checkIndentation
(DetailAST firstNode, DetailAST lastNode, int indentLevel, int startIndent, LineWrappingHandler.LineWrappingOptions ignoreFirstLine) Checks line wrapping into expressions and definitions.protected final void
AbstractExpressionHandler.checkLeftParen
(DetailAST lparen) Check the indentation of the left parenthesis.protected final void
AbstractExpressionHandler.checkRightParen
(DetailAST lparen, DetailAST rparen) Check the indentation of the right parenthesis.protected void
AbstractExpressionHandler.checkWrappingIndentation
(DetailAST firstNode, DetailAST lastNode) Checks indentation on wrapped lines between and includingfirstNode
andlastNode
.protected void
AbstractExpressionHandler.checkWrappingIndentation
(DetailAST firstNode, DetailAST lastNode, int wrappedIndentLevel, int startIndent, boolean ignoreFirstLine) Checks indentation on wrapped lines between and includingfirstNode
andlastNode
.protected final int
AbstractExpressionHandler.expandedTabsColumnNo
(DetailAST ast) Get the column number for the start of a given expression, expanding tabs out into spaces in the process.protected final int
DetailAstSet.expandedTabsColumnNo
(DetailAST ast) Get the column number for the start of a given expression, expanding tabs out into spaces in the process.protected final void
AbstractExpressionHandler.findSubtreeAst
(DetailAstSet astSet, DetailAST tree, boolean allowNesting) Find the set of abstract syntax tree for a given subtree.protected static DetailAST
AbstractExpressionHandler.getFirstAst
(DetailAST ast, DetailAST tree) Get the first ast for given expression.protected static int
AbstractExpressionHandler.getFirstLine
(DetailAST tree) Get the first line number for given expression.static DetailAST
AbstractExpressionHandler.getFirstToken
(DetailAST ast) Searches in given sub-tree (including given node) for the token which represents first symbol for this sub-tree in file.HandlerFactory.getHandler
(IndentationCheck indentCheck, DetailAST ast, AbstractExpressionHandler parent) Get the handler for an AST.protected final int
AbstractExpressionHandler.getLineStart
(DetailAST ast) Get the start of the line for the given expression.void
IndentationCheck.indentationLog
(DetailAST ast, String key, Object... args) Log a violation message.protected final boolean
AbstractExpressionHandler.isOnStartOfLine
(DetailAST ast) Determines if the given expression is at the start of a line.void
IndentationCheck.leaveToken
(DetailAST ast) protected final void
Log an indentation error.protected final void
AbstractExpressionHandler.logError
(DetailAST ast, String subtypeName, int actualIndent, IndentLevel expectedIndent) Log an indentation error.void
CommentsIndentationCheck.visitToken
(DetailAST commentAst) void
IndentationCheck.visitToken
(DetailAST ast) Constructors in com.puppycrawl.tools.checkstyle.checks.indentation with parameters of type DetailASTModifierConstructorDescriptionprotected
AbstractExpressionHandler
(IndentationCheck indentCheck, String typeName, DetailAST expr, AbstractExpressionHandler parent) Construct an instance of this handler with the given indentation check, name, abstract syntax tree, and parent handler.ArrayInitHandler
(IndentationCheck indentCheck, DetailAST ast, AbstractExpressionHandler parent) Construct an instance of this handler with the given indentation check, abstract syntax tree, and parent handler.BlockParentHandler
(IndentationCheck indentCheck, String name, DetailAST ast, AbstractExpressionHandler parent) Construct an instance of this handler with the given indentation check, name, abstract syntax tree, and parent handler.CaseHandler
(IndentationCheck indentCheck, DetailAST expr, AbstractExpressionHandler parent) Construct an instance of this handler with the given indentation check, abstract syntax tree, and parent handler.CatchHandler
(IndentationCheck indentCheck, DetailAST ast, AbstractExpressionHandler parent) Construct an instance of this handler with the given indentation check, abstract syntax tree, and parent handler.ClassDefHandler
(IndentationCheck indentCheck, DetailAST ast, AbstractExpressionHandler parent) Construct an instance of this handler with the given indentation check, abstract syntax tree, and parent handler.DoWhileHandler
(IndentationCheck indentCheck, DetailAST ast, AbstractExpressionHandler parent) Construct an instance of this handler with the given indentation check, abstract syntax tree, and parent handler.ElseHandler
(IndentationCheck indentCheck, DetailAST ast, AbstractExpressionHandler parent) Construct an instance of this handler with the given indentation check, abstract syntax tree, and parent handler.FinallyHandler
(IndentationCheck indentCheck, DetailAST ast, AbstractExpressionHandler parent) Construct an instance of this handler with the given indentation check, abstract syntax tree, and parent handler.ForHandler
(IndentationCheck indentCheck, DetailAST ast, AbstractExpressionHandler parent) Construct an instance of this handler with the given indentation check, abstract syntax tree, and parent handler.IfHandler
(IndentationCheck indentCheck, DetailAST ast, AbstractExpressionHandler parent) Construct an instance of this handler with the given indentation check, abstract syntax tree, and parent handler.ImportHandler
(IndentationCheck indentCheck, DetailAST ast, AbstractExpressionHandler parent) Construct an instance of this handler with the given indentation check, abstract syntax tree, and parent handler.IndexHandler
(IndentationCheck indentCheck, DetailAST ast, AbstractExpressionHandler parent) Construct an instance of this handler with the given indentation check, abstract syntax tree, and parent handler.LabelHandler
(IndentationCheck indentCheck, DetailAST expr, AbstractExpressionHandler parent) Construct an instance of this handler with the given indentation check, abstract syntax tree, and parent handler.LambdaHandler
(IndentationCheck indentCheck, DetailAST ast, AbstractExpressionHandler parent) Construct an instance of this handler with the given indentation check, abstract syntax tree, and parent handler.MemberDefHandler
(IndentationCheck indentCheck, DetailAST ast, AbstractExpressionHandler parent) Construct an instance of this handler with the given indentation check, abstract syntax tree, and parent handler.MethodCallHandler
(IndentationCheck indentCheck, DetailAST ast, AbstractExpressionHandler parent) Construct an instance of this handler with the given indentation check, abstract syntax tree, and parent handler.MethodDefHandler
(IndentationCheck indentCheck, DetailAST ast, AbstractExpressionHandler parent) Construct an instance of this handler with the given indentation check, abstract syntax tree, and parent handler.NewHandler
(IndentationCheck indentCheck, DetailAST ast, AbstractExpressionHandler parent) Construct an instance of this handler with the given indentation check, abstract syntax tree, and parent handler.ObjectBlockHandler
(IndentationCheck indentCheck, DetailAST ast, AbstractExpressionHandler parent) Construct an instance of this handler with the given indentation check, abstract syntax tree, and parent handler.PackageDefHandler
(IndentationCheck indentCheck, DetailAST ast, AbstractExpressionHandler parent) Construct an instance of this handler with the given indentation check, abstract syntax tree, and parent handler.SlistHandler
(IndentationCheck indentCheck, DetailAST ast, AbstractExpressionHandler parent) Construct an instance of this handler with the given indentation check, abstract syntax tree, and parent handler.StaticInitHandler
(IndentationCheck indentCheck, DetailAST ast, AbstractExpressionHandler parent) Construct an instance of this handler with the given indentation check, abstract syntax tree, and parent handler.SwitchHandler
(IndentationCheck indentCheck, DetailAST ast, AbstractExpressionHandler parent) Construct an instance of this handler with the given indentation check, abstract syntax tree, and parent handler.SwitchRuleHandler
(IndentationCheck indentCheck, DetailAST expr, AbstractExpressionHandler parent) Construct an instance of this handler with the given indentation check, abstract syntax tree, and parent handler.SynchronizedHandler
(IndentationCheck indentCheck, DetailAST ast, AbstractExpressionHandler parent) Construct an instance of this handler with the given indentation check, name, abstract syntax tree, and parent handler.TryHandler
(IndentationCheck indentCheck, DetailAST ast, AbstractExpressionHandler parent) Construct an instance of this handler with the given indentation check, abstract syntax tree, and parent handler.WhileHandler
(IndentationCheck indentCheck, DetailAST ast, AbstractExpressionHandler parent) Construct an instance of this handler with the given indentation check, abstract syntax tree, and parent handler.YieldHandler
(IndentationCheck indentCheck, DetailAST ast, AbstractExpressionHandler parent) Construct an instance of this handler with the given indentation check, abstract syntax tree, and parent handler. -
Uses of DetailAST in com.puppycrawl.tools.checkstyle.checks.javadoc
Methods in com.puppycrawl.tools.checkstyle.checks.javadoc that return DetailASTModifier and TypeMethodDescriptionprotected DetailAST
AbstractJavadocCheck.getBlockCommentAst()
Getter for block comment in Java language syntax tree.Methods in com.puppycrawl.tools.checkstyle.checks.javadoc that return types with arguments of type DetailASTModifier and TypeMethodDescriptionJavadocMethodCheck.findTokensInAstByType
(DetailAST root, int astType) Finds node of specified type among root children, siblings, siblings children on any deep level.Methods in com.puppycrawl.tools.checkstyle.checks.javadoc with parameters of type DetailASTModifier and TypeMethodDescriptionfinal void
void
JavadocMethodCheck.findTokensInAstByType
(DetailAST root, int astType) Finds node of specified type among root children, siblings, siblings children on any deep level.final void
AbstractJavadocCheck.finishTree
(DetailAST rootAST) abstract boolean
Checks if a particular Javadoc tag is valid within a Javadoc block of a given AST.final void
JavadocMethodCheck.leaveToken
(DetailAST ast) final void
AbstractJavadocCheck.visitToken
(DetailAST blockCommentNode) void
InvalidJavadocPositionCheck.visitToken
(DetailAST ast) void
JavadocContentLocationCheck.visitToken
(DetailAST ast) final void
JavadocMethodCheck.visitToken
(DetailAST ast) void
JavadocStyleCheck.visitToken
(DetailAST ast) void
JavadocTypeCheck.visitToken
(DetailAST ast) void
JavadocVariableCheck.visitToken
(DetailAST ast) final void
MissingJavadocMethodCheck.visitToken
(DetailAST ast) void
MissingJavadocPackageCheck.visitToken
(DetailAST ast) void
MissingJavadocTypeCheck.visitToken
(DetailAST ast) void
WriteTagCheck.visitToken
(DetailAST ast) -
Uses of DetailAST in com.puppycrawl.tools.checkstyle.checks.metrics
Methods in com.puppycrawl.tools.checkstyle.checks.metrics with parameters of type DetailASTModifier and TypeMethodDescriptionfinal void
void
void
void
JavaNCSSCheck.finishTree
(DetailAST rootAST) void
AbstractClassCouplingCheck.leaveToken
(DetailAST ast) void
BooleanExpressionComplexityCheck.leaveToken
(DetailAST ast) void
CyclomaticComplexityCheck.leaveToken
(DetailAST ast) void
JavaNCSSCheck.leaveToken
(DetailAST ast) void
NPathComplexityCheck.leaveToken
(DetailAST ast) void
AbstractClassCouplingCheck.visitToken
(DetailAST ast) void
BooleanExpressionComplexityCheck.visitToken
(DetailAST ast) void
CyclomaticComplexityCheck.visitToken
(DetailAST ast) void
JavaNCSSCheck.visitToken
(DetailAST ast) void
NPathComplexityCheck.visitToken
(DetailAST ast) -
Uses of DetailAST in com.puppycrawl.tools.checkstyle.checks.modifier
Methods in com.puppycrawl.tools.checkstyle.checks.modifier with parameters of type DetailASTModifier and TypeMethodDescriptionvoid
ClassMemberImpliedModifierCheck.visitToken
(DetailAST ast) void
InterfaceMemberImpliedModifierCheck.visitToken
(DetailAST ast) void
ModifierOrderCheck.visitToken
(DetailAST ast) void
RedundantModifierCheck.visitToken
(DetailAST ast) -
Uses of DetailAST in com.puppycrawl.tools.checkstyle.checks.naming
Methods in com.puppycrawl.tools.checkstyle.checks.naming with parameters of type DetailASTModifier and TypeMethodDescriptionprotected boolean
AbstractAccessControlNameCheck.mustCheckName
(DetailAST ast) protected abstract boolean
AbstractNameCheck.mustCheckName
(DetailAST ast) Decides whether the name of an AST should be checked against the format regexp.protected boolean
CatchParameterNameCheck.mustCheckName
(DetailAST ast) protected final boolean
ClassTypeParameterNameCheck.mustCheckName
(DetailAST ast) protected final boolean
ConstantNameCheck.mustCheckName
(DetailAST ast) protected boolean
IllegalIdentifierNameCheck.mustCheckName
(DetailAST ast) protected final boolean
InterfaceTypeParameterNameCheck.mustCheckName
(DetailAST ast) protected boolean
LambdaParameterNameCheck.mustCheckName
(DetailAST ast) protected final boolean
LocalFinalVariableNameCheck.mustCheckName
(DetailAST ast) protected final boolean
LocalVariableNameCheck.mustCheckName
(DetailAST ast) protected final boolean
MemberNameCheck.mustCheckName
(DetailAST ast) protected final boolean
MethodTypeParameterNameCheck.mustCheckName
(DetailAST ast) protected boolean
ParameterNameCheck.mustCheckName
(DetailAST ast) protected final boolean
PatternVariableNameCheck.mustCheckName
(DetailAST ast) protected final boolean
RecordTypeParameterNameCheck.mustCheckName
(DetailAST ast) protected final boolean
StaticVariableNameCheck.mustCheckName
(DetailAST ast) protected boolean
AbstractAccessControlNameCheck.shouldCheckInScope
(DetailAST modifiers) Should we check member with given modifiers.void
AbbreviationAsWordInNameCheck.visitToken
(DetailAST ast) void
AbstractClassNameCheck.visitToken
(DetailAST ast) void
AbstractNameCheck.visitToken
(DetailAST ast) void
LambdaParameterNameCheck.visitToken
(DetailAST ast) void
MethodNameCheck.visitToken
(DetailAST ast) void
PackageNameCheck.visitToken
(DetailAST ast) -
Uses of DetailAST in com.puppycrawl.tools.checkstyle.checks.regexp
Methods in com.puppycrawl.tools.checkstyle.checks.regexp with parameters of type DetailAST -
Uses of DetailAST in com.puppycrawl.tools.checkstyle.checks.sizes
Methods in com.puppycrawl.tools.checkstyle.checks.sizes with parameters of type DetailASTModifier and TypeMethodDescriptionvoid
void
void
OuterTypeNumberCheck.finishTree
(DetailAST ast) void
ExecutableStatementCountCheck.leaveToken
(DetailAST ast) void
MethodCountCheck.leaveToken
(DetailAST ast) void
OuterTypeNumberCheck.leaveToken
(DetailAST ast) void
AnonInnerLengthCheck.visitToken
(DetailAST ast) void
ExecutableStatementCountCheck.visitToken
(DetailAST ast) void
MethodCountCheck.visitToken
(DetailAST ast) void
MethodLengthCheck.visitToken
(DetailAST ast) void
OuterTypeNumberCheck.visitToken
(DetailAST ast) void
ParameterNumberCheck.visitToken
(DetailAST ast) void
RecordComponentNumberCheck.visitToken
(DetailAST ast) -
Uses of DetailAST in com.puppycrawl.tools.checkstyle.checks.whitespace
Methods in com.puppycrawl.tools.checkstyle.checks.whitespace with parameters of type DetailASTModifier and TypeMethodDescriptionvoid
void
protected void
AbstractParenPadCheck.processLeft
(DetailAST ast) Process a token representing a left parentheses.protected void
AbstractParenPadCheck.processRight
(DetailAST ast) Process a token representing a right parentheses.void
EmptyForInitializerPadCheck.visitToken
(DetailAST ast) void
EmptyForIteratorPadCheck.visitToken
(DetailAST ast) void
EmptyLineSeparatorCheck.visitToken
(DetailAST ast) void
GenericWhitespaceCheck.visitToken
(DetailAST ast) void
MethodParamPadCheck.visitToken
(DetailAST ast) void
NoLineWrapCheck.visitToken
(DetailAST ast) void
NoWhitespaceAfterCheck.visitToken
(DetailAST ast) void
NoWhitespaceBeforeCheck.visitToken
(DetailAST ast) void
OperatorWrapCheck.visitToken
(DetailAST ast) void
ParenPadCheck.visitToken
(DetailAST ast) void
SeparatorWrapCheck.visitToken
(DetailAST ast) void
TypecastParenPadCheck.visitToken
(DetailAST ast) void
WhitespaceAfterCheck.visitToken
(DetailAST ast) void
WhitespaceAroundCheck.visitToken
(DetailAST ast) -
Uses of DetailAST in com.puppycrawl.tools.checkstyle.gui
Methods in com.puppycrawl.tools.checkstyle.gui with parameters of type DetailASTModifier and TypeMethodDescriptionprotected final void
ParseTreeTableModel.setParseTree
(DetailAST parseTree) Sets parse tree.protected final void
ParseTreeTablePresentation.setParseTree
(DetailAST parseTree) Set parse tree.Constructors in com.puppycrawl.tools.checkstyle.gui with parameters of type DetailASTModifierConstructorDescriptionCodeSelectorPresentation
(DetailAST ast, List<Integer> lines2position) Constructor.ParseTreeTableModel
(DetailAST parseTree) Initialise pModel.ParseTreeTablePresentation
(DetailAST parseTree) Constructor initialise root node. -
Uses of DetailAST in com.puppycrawl.tools.checkstyle.utils
Methods in com.puppycrawl.tools.checkstyle.utils that return DetailASTModifier and TypeMethodDescriptionstatic DetailAST
CommonUtil.createBlockCommentNode
(antlr.Token token) Create block comment from token.static DetailAST
CommonUtil.createBlockCommentNode
(String content) Create block comment from string content.static DetailAST
AnnotationUtil.getAnnotation
(DetailAST ast, String annotation) Checks if the AST is annotated with the passed in annotation and returns the AST representing that annotation.static DetailAST
AnnotationUtil.getAnnotationHolder
(DetailAST ast) Gets the AST that holds a series of annotations for the potentially annotated AST.static DetailAST
CheckUtil.getFirstNode
(DetailAST node) Finds sub-node for given node minimal (line, column) pair.Methods in com.puppycrawl.tools.checkstyle.utils that return types with arguments of type DetailASTModifier and TypeMethodDescriptionTokenUtil.findFirstTokenByPredicate
(DetailAST root, Predicate<DetailAST> predicate) CheckUtil.getTypeParameters
(DetailAST node) Retrieves the type parameters to the node.Methods in com.puppycrawl.tools.checkstyle.utils with parameters of type DetailASTModifier and TypeMethodDescriptionstatic boolean
TokenUtil.areOnSameLine
(DetailAST ast1, DetailAST ast2) Determines if two ASTs are on the same line.static boolean
AnnotationUtil.containsAnnotation
(DetailAST ast) Checks if the AST is annotated with any annotation.static boolean
AnnotationUtil.containsAnnotation
(DetailAST ast, String annotation) Checks if the AST is annotated with the passed in annotation.static boolean
AnnotationUtil.containsAnnotation
(DetailAST ast, List<String> annotations) Checks if the given AST element is annotated with any of the specified annotations.static FullIdent
CheckUtil.createFullType
(DetailAST typeAST) CreatesFullIdent
for given type node.TokenUtil.findFirstTokenByPredicate
(DetailAST root, Predicate<DetailAST> predicate) static void
TokenUtil.forEachChild
(DetailAST root, int type, Consumer<DetailAST> action) Performs an action for each child ofDetailAST
root node which matches the given token type.static AccessModifierOption
CheckUtil.getAccessModifierFromModifiersToken
(DetailAST modifiersToken) ReturnsAccessModifierOption
based on the information about access modifier taken from the given token of typeTokenTypes.MODIFIERS
.static DetailAST
AnnotationUtil.getAnnotation
(DetailAST ast, String annotation) Checks if the AST is annotated with the passed in annotation and returns the AST representing that annotation.static DetailAST
AnnotationUtil.getAnnotationHolder
(DetailAST ast) Gets the AST that holds a series of annotations for the potentially annotated AST.static String
JavadocUtil.getBlockCommentContent
(DetailAST blockCommentBegin) Gets content of block comment.static DetailAST
CheckUtil.getFirstNode
(DetailAST node) Finds sub-node for given node minimal (line, column) pair.static String
JavadocUtil.getJavadocCommentContent
(DetailAST javadocCommentBegin) Get content of Javadoc comment.static Scope
ScopeUtil.getScopeFromMods
(DetailAST aMods) Returns the Scope specified by the modifier set.static Scope
ScopeUtil.getSurroundingScope
(DetailAST node) Returns the scope of the surrounding "block".static String
XpathUtil.getTextAttributeValue
(DetailAST ast) Returns content of the text attribute of the ast element.CheckUtil.getTypeParameterNames
(DetailAST node) Retrieves the names of the type parameters to the node.CheckUtil.getTypeParameters
(DetailAST node) Retrieves the type parameters to the node.static boolean
CheckUtil.isBeforeInSource
(DetailAST ast1, DetailAST ast2) Retrieves whether ast1 is located before ast2.static boolean
ScopeUtil.isClassFieldDef
(DetailAST node) Determines whether a node is a class field definition.static boolean
JavadocUtil.isCorrectJavadocPosition
(DetailAST blockComment) Checks Javadoc comment it's in right place.static boolean
Returns whether a token represents an ELSE as part of an ELSE / IF set.static boolean
CheckUtil.isEqualsMethod
(DetailAST ast) Tests whether a method definition AST defines an equals covariant.static boolean
CheckUtil.isGetterMethod
(DetailAST ast) Returns whether an AST represents a getter method.static boolean
ScopeUtil.isInAnnotationBlock
(DetailAST node) Returns whether a node is directly contained within an annotation block.static boolean
ScopeUtil.isInClassBlock
(DetailAST node) Returns whether a node is directly contained within a class block.static boolean
ScopeUtil.isInCodeBlock
(DetailAST node) Returns whether the scope of a node is restricted to a code block.static boolean
ScopeUtil.isInEnumBlock
(DetailAST node) Returns whether a node is directly contained within an enum block.static boolean
ScopeUtil.isInInterfaceBlock
(DetailAST node) Returns whether a node is directly contained within an interface block.static boolean
ScopeUtil.isInInterfaceOrAnnotationBlock
(DetailAST node) Returns whether a node is directly contained within an interface or annotation block.static boolean
ScopeUtil.isInRecordBlock
(DetailAST node) Returns whether a node is directly contained within a record block.static boolean
Checks whether ast node is in a specific scope.static boolean
JavadocUtil.isJavadocComment
(DetailAST blockCommentBegin) Checks block comment content starts with '*' javadoc comment identifier.static boolean
ScopeUtil.isLocalVariableDef
(DetailAST node) Determines whether a node is a local variable definition.static boolean
CheckUtil.isNonVoidMethod
(DetailAST methodDefAst) Checks whether a method is a not void one.static boolean
Determines if the AST belongs to the given types.static boolean
BlockCommentPosition.isOnAnnotationDef
(DetailAST blockComment) Node is on annotation definition.static boolean
BlockCommentPosition.isOnAnnotationField
(DetailAST blockComment) Node is on annotation field declaration.static boolean
Node is on class definition.static boolean
BlockCommentPosition.isOnCompactConstructor
(DetailAST blockComment) Node is on compact constructor, note that we don't need to check for a plain token here, since a compact constructor must be public.static boolean
BlockCommentPosition.isOnConstructor
(DetailAST blockComment) Node is on constructor.static boolean
Node is on enum definition.static boolean
BlockCommentPosition.isOnEnumConstant
(DetailAST blockComment) Node is on enum constant.static boolean
Node is on field declaration.static boolean
BlockCommentPosition.isOnInterface
(DetailAST blockComment) Node is on interface definition.static boolean
BlockCommentPosition.isOnMember
(DetailAST blockComment) Node is on type member declaration.static boolean
BlockCommentPosition.isOnMethod
(DetailAST blockComment) Node is on method declaration.static boolean
BlockCommentPosition.isOnPackage
(DetailAST blockComment) Node is on package definition.static boolean
BlockCommentPosition.isOnRecord
(DetailAST blockComment) Node is on record definition.static boolean
Node is on type definition.static boolean
ScopeUtil.isOuterMostType
(DetailAST node) Returns whether a node is contained in the outer most type block.static boolean
CheckUtil.isReceiverParameter
(DetailAST parameterDefAst) Checks whether a parameter is a receiver.static boolean
CheckUtil.isSetterMethod
(DetailAST ast) Returns whether an AST represents a setter method.static boolean
XpathUtil.supportsTextAttribute
(DetailAST ast) Checks, if specified node can have@text
attribute.Method parameters in com.puppycrawl.tools.checkstyle.utils with type arguments of type DetailASTModifier and TypeMethodDescriptionTokenUtil.findFirstTokenByPredicate
(DetailAST root, Predicate<DetailAST> predicate) static void
TokenUtil.forEachChild
(DetailAST root, int type, Consumer<DetailAST> action) Performs an action for each child ofDetailAST
root node which matches the given token type. -
Uses of DetailAST in com.puppycrawl.tools.checkstyle.xpath
Methods in com.puppycrawl.tools.checkstyle.xpath that return DetailASTModifier and TypeMethodDescriptionabstract DetailAST
AbstractNode.getUnderlyingNode()
Returns underlying node.AttributeNode.getUnderlyingNode()
Returns underlying node.ElementNode.getUnderlyingNode()
Returns underlying node.RootNode.getUnderlyingNode()
Returns underlying node.Methods in com.puppycrawl.tools.checkstyle.xpath with parameters of type DetailASTModifier and TypeMethodDescriptionstatic String
XpathQueryGenerator.generateXpathQuery
(DetailAST ast) Returns full xpath query for given ast element.Constructors in com.puppycrawl.tools.checkstyle.xpath with parameters of type DetailASTModifierConstructorDescriptionElementNode
(AbstractNode root, AbstractNode parent, DetailAST detailAst) Creates a newElementNode
instance.Creates a newRootNode
instance.XpathQueryGenerator
(DetailAST rootAst, int lineNumber, int columnNumber, int tokenType, FileText fileText, int tabWidth) Creates a newXpathQueryGenerator
instance.XpathQueryGenerator
(DetailAST rootAst, int lineNumber, int columnNumber, FileText fileText, int tabWidth) Creates a newXpathQueryGenerator
instance.