Uses of Interface
com.puppycrawl.tools.checkstyle.api.DetailAST
-
Packages that use DetailAST Package Description com.puppycrawl.tools.checkstyle Contains the implementation of the Checkstyle framework.com.puppycrawl.tools.checkstyle.api Contains the core API to be used to implement checks.com.puppycrawl.tools.checkstyle.checks 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.gui User interface classes for CheckStyle.com.puppycrawl.tools.checkstyle.utils Contains utils classes for checkstyle.com.puppycrawl.tools.checkstyle.xpath 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 DetailAST Modifier and Type Class Description class
DetailAstImpl
The implementation ofDetailAST
.Methods in com.puppycrawl.tools.checkstyle that return DetailAST Modifier and Type Method Description static DetailAST
JavaParser. appendHiddenCommentNodes(DetailAST root)
Appends comment nodes to existing AST.DetailAST
DetailAstImpl. findFirstToken(int type)
DetailAST
DetailAstImpl. getLastChild()
DetailAST
DetailAstImpl. getParent()
DetailAST
DetailAstImpl. getPreviousSibling()
DetailAST
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(java.io.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 DetailAST Modifier and Type Method Description void
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.ParseStatus
JavadocDetailNodeParser. parseJavadocAsDetailNode(DetailAST javadocCommentAst)
Parses Javadoc comment as DetailNode tree.static java.lang.String
AstTreeStringPrinter. printBranch(DetailAST node)
Print branch info from root down to givennode
.Constructors in com.puppycrawl.tools.checkstyle with parameters of type DetailAST Constructor Description TreeWalkerAuditEvent(FileContents fileContents, java.lang.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 DetailAST Modifier and Type Method Description DetailAST
DetailAST. findFirstToken(int type)
Returns the first child token that makes a specified type.DetailAST
FullIdent. getDetailAst()
Gets the topmost leftmost DetailAST for this FullIdent.DetailAST
DetailAST. getFirstChild()
Get the first child of this AST.DetailAST
DetailAST. getLastChild()
Gets the last child node.DetailAST
DetailAST. getNextSibling()
Get the next sibling in line after this one.DetailAST
DetailAST. getParent()
Returns the parent token.DetailAST
DetailAST. getPreviousSibling()
Returns the previous sibling or null if no such sibling exists.Methods in com.puppycrawl.tools.checkstyle.api with parameters of type DetailAST Modifier and Type Method Description void
AbstractCheck. beginTree(DetailAST rootAST)
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.void
AbstractCheck. log(DetailAST ast, java.lang.String key, java.lang.Object... args)
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 DetailAST Modifier and Type Method Description void
AvoidEscapedUnicodeCharactersCheck. beginTree(DetailAST rootAST)
void
OuterTypeFilenameCheck. beginTree(DetailAST rootAST)
void
SuppressWarningsHolder. beginTree(DetailAST rootAST)
void
TrailingCommentCheck. beginTree(DetailAST rootAST)
void
UncommentedMainCheck. beginTree(DetailAST rootAST)
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 DetailAST Modifier and Type Method Description void
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 DetailAST Modifier and Type Method Description void
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 DetailAST Modifier and Type Method Description void
AbstractSuperCheck. beginTree(DetailAST rootAST)
void
DeclarationOrderCheck. beginTree(DetailAST rootAST)
void
EqualsAvoidNullCheck. beginTree(DetailAST rootAST)
void
EqualsHashCodeCheck. beginTree(DetailAST rootAST)
void
HiddenFieldCheck. beginTree(DetailAST rootAST)
void
IllegalInstantiationCheck. beginTree(DetailAST rootAST)
void
IllegalTypeCheck. beginTree(DetailAST rootAST)
void
ModifiedControlVariableCheck. beginTree(DetailAST rootAST)
void
MultipleStringLiteralsCheck. beginTree(DetailAST rootAST)
void
NestedForDepthCheck. beginTree(DetailAST rootAST)
void
NestedIfDepthCheck. beginTree(DetailAST rootAST)
void
NestedTryDepthCheck. beginTree(DetailAST rootAST)
void
OneStatementPerLineCheck. beginTree(DetailAST rootAST)
void
PackageDeclarationCheck. beginTree(DetailAST ast)
void
ParameterAssignmentCheck. beginTree(DetailAST rootAST)
void
RequireThisCheck. beginTree(DetailAST rootAST)
void
ReturnCountCheck. beginTree(DetailAST rootAST)
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 DetailAST Modifier and Type Method Description void
FinalClassCheck. beginTree(DetailAST rootAST)
void
InnerTypeLastCheck. beginTree(DetailAST rootAST)
void
OneTopLevelClassCheck. beginTree(DetailAST rootAST)
void
VisibilityModifierCheck. beginTree(DetailAST rootAst)
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 DetailAST Modifier and Type Method Description void
CustomImportOrderCheck. beginTree(DetailAST rootAST)
void
ImportControlCheck. beginTree(DetailAST rootAST)
void
ImportOrderCheck. beginTree(DetailAST rootAST)
void
RedundantImportCheck. beginTree(DetailAST aRootAST)
void
UnusedImportsCheck. beginTree(DetailAST rootAST)
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 DetailAST Modifier and Type Method Description DetailAST
DetailAstSet. firstLine()
The first line in set of ast.DetailAST
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 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 DetailAST Modifier and Type Method Description void
DetailAstSet. addAst(DetailAST ast)
Add ast to the set of ast.void
IndentationCheck. beginTree(DetailAST ast)
protected 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 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 void
AbstractExpressionHandler. checkLeftParen(DetailAST lparen)
Check the indentation of the left parenthesis.protected 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 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 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 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.AbstractExpressionHandler
HandlerFactory. getHandler(IndentationCheck indentCheck, DetailAST ast, AbstractExpressionHandler parent)
Get the handler for an AST.protected int
AbstractExpressionHandler. getLineStart(DetailAST ast)
Get the start of the line for the given expression.void
IndentationCheck. indentationLog(DetailAST ast, java.lang.String key, java.lang.Object... args)
Log a violation message.protected boolean
AbstractExpressionHandler. isOnStartOfLine(DetailAST ast)
Determines if the given expression is at the start of a line.void
IndentationCheck. leaveToken(DetailAST ast)
protected void
AbstractExpressionHandler. logError(DetailAST ast, java.lang.String subtypeName, int actualIndent)
Log an indentation error.protected void
AbstractExpressionHandler. logError(DetailAST ast, java.lang.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 DetailAST Constructor Description AbstractExpressionHandler(IndentationCheck indentCheck, java.lang.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, java.lang.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 DetailAST Modifier and Type Method Description protected 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 DetailAST Modifier and Type Method Description static java.util.List<DetailAST>
JavadocMethodCheck. 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 DetailAST Modifier and Type Method Description void
AbstractJavadocCheck. beginTree(DetailAST rootAST)
void
JavadocMethodCheck. beginTree(DetailAST rootAST)
static java.util.List<DetailAST>
JavadocMethodCheck. findTokensInAstByType(DetailAST root, int astType)
Finds node of specified type among root children, siblings, siblings children on any deep level.void
AbstractJavadocCheck. finishTree(DetailAST rootAST)
abstract boolean
JavadocTagInfo. isValidOn(DetailAST ast)
Checks if a particular Javadoc tag is valid within a Javadoc block of a given AST.void
JavadocMethodCheck. leaveToken(DetailAST ast)
void
AbstractJavadocCheck. visitToken(DetailAST blockCommentNode)
void
InvalidJavadocPositionCheck. visitToken(DetailAST ast)
void
JavadocContentLocationCheck. visitToken(DetailAST ast)
void
JavadocMethodCheck. visitToken(DetailAST ast)
void
JavadocStyleCheck. visitToken(DetailAST ast)
void
JavadocTypeCheck. visitToken(DetailAST ast)
void
JavadocVariableCheck. visitToken(DetailAST ast)
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 DetailAST Modifier and Type Method Description void
AbstractClassCouplingCheck. beginTree(DetailAST ast)
void
JavaNCSSCheck. beginTree(DetailAST rootAST)
void
NPathComplexityCheck. beginTree(DetailAST rootAST)
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 DetailAST Modifier and Type Method Description void
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 DetailAST Modifier and Type Method Description protected 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 boolean
ClassTypeParameterNameCheck. mustCheckName(DetailAST ast)
protected boolean
ConstantNameCheck. mustCheckName(DetailAST ast)
protected boolean
IllegalIdentifierNameCheck. mustCheckName(DetailAST ast)
protected boolean
InterfaceTypeParameterNameCheck. mustCheckName(DetailAST ast)
protected boolean
LambdaParameterNameCheck. mustCheckName(DetailAST ast)
protected boolean
LocalFinalVariableNameCheck. mustCheckName(DetailAST ast)
protected boolean
LocalVariableNameCheck. mustCheckName(DetailAST ast)
protected boolean
MemberNameCheck. mustCheckName(DetailAST ast)
protected boolean
MethodTypeParameterNameCheck. mustCheckName(DetailAST ast)
protected boolean
ParameterNameCheck. mustCheckName(DetailAST ast)
protected boolean
PatternVariableNameCheck. mustCheckName(DetailAST ast)
protected boolean
RecordTypeParameterNameCheck. mustCheckName(DetailAST ast)
protected 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 Modifier and Type Method Description void
RegexpCheck. beginTree(DetailAST rootAST)
void
RegexpSinglelineJavaCheck. beginTree(DetailAST rootAST)
-
Uses of DetailAST in com.puppycrawl.tools.checkstyle.checks.sizes
Methods in com.puppycrawl.tools.checkstyle.checks.sizes with parameters of type DetailAST Modifier and Type Method Description void
ExecutableStatementCountCheck. beginTree(DetailAST rootAST)
void
OuterTypeNumberCheck. beginTree(DetailAST ast)
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 DetailAST Modifier and Type Method Description void
GenericWhitespaceCheck. beginTree(DetailAST rootAST)
void
SingleSpaceSeparatorCheck. beginTree(DetailAST rootAST)
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 DetailAST Modifier and Type Method Description protected void
ParseTreeTableModel. setParseTree(DetailAST parseTree)
Sets parse tree.protected void
ParseTreeTablePresentation. setParseTree(DetailAST parseTree)
Set parse tree.Constructors in com.puppycrawl.tools.checkstyle.gui with parameters of type DetailAST Constructor Description CodeSelectorPresentation(DetailAST ast, java.util.List<java.lang.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 DetailAST Modifier and Type Method Description static DetailAST
CommonUtil. createBlockCommentNode(antlr.Token token)
Create block comment from token.static DetailAST
CommonUtil. createBlockCommentNode(java.lang.String content)
Create block comment from string content.static DetailAST
AnnotationUtil. getAnnotation(DetailAST ast, java.lang.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 DetailAST Modifier and Type Method Description static java.util.Optional<DetailAST>
TokenUtil. findFirstTokenByPredicate(DetailAST root, java.util.function.Predicate<DetailAST> predicate)
Finds the firstOptional
child token ofDetailAST
root node which matches the given predicate.static java.util.List<DetailAST>
CheckUtil. getTypeParameters(DetailAST node)
Retrieves the type parameters to the node.Methods in com.puppycrawl.tools.checkstyle.utils with parameters of type DetailAST Modifier and Type Method Description static 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, java.lang.String annotation)
Checks if the AST is annotated with the passed in annotation.static boolean
AnnotationUtil. containsAnnotation(DetailAST ast, java.util.List<java.lang.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.static java.util.Optional<DetailAST>
TokenUtil. findFirstTokenByPredicate(DetailAST root, java.util.function.Predicate<DetailAST> predicate)
Finds the firstOptional
child token ofDetailAST
root node which matches the given predicate.static void
TokenUtil. forEachChild(DetailAST root, int type, java.util.function.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, java.lang.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 java.lang.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 java.lang.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 java.lang.String
XpathUtil. getTextAttributeValue(DetailAST ast)
Returns content of the text attribute of the ast element.static java.util.List<java.lang.String>
CheckUtil. getTypeParameterNames(DetailAST node)
Retrieves the names of the type parameters to the node.static java.util.List<DetailAST>
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
CheckUtil. isElseIf(DetailAST ast)
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
ScopeUtil. isInScope(DetailAST ast, Scope scope)
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
TokenUtil. isOfType(DetailAST ast, int... types)
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
BlockCommentPosition. isOnClass(DetailAST blockComment)
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
BlockCommentPosition. isOnEnum(DetailAST blockComment)
Node is on enum definition.static boolean
BlockCommentPosition. isOnEnumConstant(DetailAST blockComment)
Node is on enum constant.static boolean
BlockCommentPosition. isOnField(DetailAST blockComment)
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
BlockCommentPosition. isOnType(DetailAST blockComment)
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 DetailAST Modifier and Type Method Description static java.util.Optional<DetailAST>
TokenUtil. findFirstTokenByPredicate(DetailAST root, java.util.function.Predicate<DetailAST> predicate)
Finds the firstOptional
child token ofDetailAST
root node which matches the given predicate.static void
TokenUtil. forEachChild(DetailAST root, int type, java.util.function.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 DetailAST Modifier and Type Method Description abstract DetailAST
AbstractNode. getUnderlyingNode()
Returns underlying node.DetailAST
AttributeNode. getUnderlyingNode()
Returns underlying node.DetailAST
ElementNode. getUnderlyingNode()
Returns underlying node.DetailAST
RootNode. getUnderlyingNode()
Returns underlying node.Methods in com.puppycrawl.tools.checkstyle.xpath with parameters of type DetailAST Modifier and Type Method Description static java.lang.String
XpathQueryGenerator. generateXpathQuery(DetailAST ast)
Returns full xpath query for given ast element.Constructors in com.puppycrawl.tools.checkstyle.xpath with parameters of type DetailAST Constructor Description ElementNode(AbstractNode root, AbstractNode parent, DetailAST detailAst)
Creates a newElementNode
instance.RootNode(DetailAST detailAst)
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.
-