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.
|
Modifier and Type | Method and Description |
---|---|
static DetailAST |
JavaParser.appendHiddenCommentNodes(DetailAST root)
Appends comment nodes to existing AST.
|
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(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.
|
Modifier and Type | Method and Description |
---|---|
static DetailAST |
JavaParser.appendHiddenCommentNodes(DetailAST root)
Appends comment nodes to existing AST.
|
JavadocDetailNodeParser.ParseStatus |
JavadocDetailNodeParser.parseJavadocAsDetailNode(DetailAST javadocCommentAst)
Parses Javadoc comment as DetailNode tree.
|
static DetailNode |
DetailNodeTreeStringPrinter.parseJavadocAsDetailNode(DetailAST blockComment)
Parse block comment DetailAST as Javadoc DetailNode tree.
|
Constructor and Description |
---|
TreeWalkerAuditEvent(FileContents fileContents,
String fileName,
LocalizedMessage localizedMessage,
DetailAST rootAst)
Creates a new
TreeWalkerAuditEvent instance. |
Modifier and Type | Method and Description |
---|---|
DetailAST |
DetailAST.findFirstToken(int type)
Returns the first child token that makes a specified type.
|
DetailAST |
DetailAST.getFirstChild() |
DetailAST |
DetailAST.getLastChild()
Gets the last child node.
|
DetailAST |
DetailAST.getNextSibling() |
DetailAST |
DetailAST.getParent()
Returns the parent token.
|
DetailAST |
DetailAST.getPreviousSibling()
Returns the previous sibling or null if no such sibling exists.
|
Modifier and Type | Method and Description |
---|---|
void |
DetailAST.addNextSibling(DetailAST ast)
Add next sibling.
|
void |
DetailAST.addPreviousSibling(DetailAST ast)
Add previous sibling.
|
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,
String key,
Object... args)
Helper method to log a LocalizedMessage.
|
void |
AbstractCheck.visitToken(DetailAST ast)
Called to process a token.
|
Modifier and Type | Method and Description |
---|---|
void |
AvoidEscapedUnicodeCharactersCheck.beginTree(DetailAST rootAST) |
void |
UncommentedMainCheck.beginTree(DetailAST rootAST) |
void |
TrailingCommentCheck.beginTree(DetailAST rootAST) |
void |
SuppressWarningsHolder.beginTree(DetailAST rootAST) |
void |
OuterTypeFilenameCheck.beginTree(DetailAST rootAST) |
void |
OuterTypeFilenameCheck.finishTree(DetailAST rootAST) |
void |
UncommentedMainCheck.leaveToken(DetailAST ast) |
void |
AvoidEscapedUnicodeCharactersCheck.visitToken(DetailAST ast) |
void |
UpperEllCheck.visitToken(DetailAST ast) |
void |
UncommentedMainCheck.visitToken(DetailAST ast) |
void |
TrailingCommentCheck.visitToken(DetailAST ast) |
void |
TodoCommentCheck.visitToken(DetailAST ast) |
void |
SuppressWarningsHolder.visitToken(DetailAST ast) |
void |
OuterTypeFilenameCheck.visitToken(DetailAST ast) |
void |
FinalParametersCheck.visitToken(DetailAST ast) |
void |
DescendantTokenCheck.visitToken(DetailAST ast) |
void |
ArrayTypeStyleCheck.visitToken(DetailAST ast) |
Modifier and Type | Method and Description |
---|---|
void |
SuppressWarningsCheck.visitToken(DetailAST ast) |
void |
PackageAnnotationCheck.visitToken(DetailAST ast) |
void |
MissingOverrideCheck.visitToken(DetailAST ast) |
void |
MissingDeprecatedCheck.visitToken(DetailAST ast) |
void |
AnnotationUseStyleCheck.visitToken(DetailAST ast) |
void |
AnnotationOnSameLineCheck.visitToken(DetailAST ast) |
void |
AnnotationLocationCheck.visitToken(DetailAST ast) |
Modifier and Type | Method and Description |
---|---|
void |
RightCurlyCheck.visitToken(DetailAST ast) |
void |
NeedBracesCheck.visitToken(DetailAST ast) |
void |
LeftCurlyCheck.visitToken(DetailAST ast) |
void |
EmptyCatchBlockCheck.visitToken(DetailAST ast) |
void |
EmptyBlockCheck.visitToken(DetailAST ast) |
void |
AvoidNestedBlocksCheck.visitToken(DetailAST ast) |
Modifier and Type | Method and Description |
---|---|
void |
IllegalTypeCheck.beginTree(DetailAST rootAST) |
void |
ReturnCountCheck.beginTree(DetailAST rootAST) |
void |
RequireThisCheck.beginTree(DetailAST rootAST) |
void |
ParameterAssignmentCheck.beginTree(DetailAST rootAST) |
void |
PackageDeclarationCheck.beginTree(DetailAST ast) |
void |
OneStatementPerLineCheck.beginTree(DetailAST rootAST) |
void |
NestedTryDepthCheck.beginTree(DetailAST rootAST) |
void |
NestedIfDepthCheck.beginTree(DetailAST rootAST) |
void |
NestedForDepthCheck.beginTree(DetailAST rootAST) |
void |
MultipleStringLiteralsCheck.beginTree(DetailAST rootAST) |
void |
ModifiedControlVariableCheck.beginTree(DetailAST rootAST) |
void |
IllegalInstantiationCheck.beginTree(DetailAST rootAST) |
void |
HiddenFieldCheck.beginTree(DetailAST rootAST) |
void |
EqualsHashCodeCheck.beginTree(DetailAST rootAST) |
void |
EqualsAvoidNullCheck.beginTree(DetailAST rootAST) |
void |
DeclarationOrderCheck.beginTree(DetailAST rootAST) |
void |
AbstractSuperCheck.beginTree(DetailAST rootAST) |
void |
PackageDeclarationCheck.finishTree(DetailAST ast) |
void |
MultipleStringLiteralsCheck.finishTree(DetailAST rootAST) |
void |
IllegalInstantiationCheck.finishTree(DetailAST rootAST) |
void |
EqualsHashCodeCheck.finishTree(DetailAST rootAST) |
void |
EqualsAvoidNullCheck.finishTree(DetailAST ast) |
void |
UnnecessaryParenthesesCheck.leaveToken(DetailAST ast) |
void |
ReturnCountCheck.leaveToken(DetailAST ast) |
void |
RequireThisCheck.leaveToken(DetailAST ast) |
void |
ParameterAssignmentCheck.leaveToken(DetailAST ast) |
void |
OneStatementPerLineCheck.leaveToken(DetailAST ast) |
void |
NestedTryDepthCheck.leaveToken(DetailAST literalTry) |
void |
NestedIfDepthCheck.leaveToken(DetailAST literalIf) |
void |
NestedForDepthCheck.leaveToken(DetailAST ast) |
void |
ModifiedControlVariableCheck.leaveToken(DetailAST ast) |
void |
HiddenFieldCheck.leaveToken(DetailAST ast) |
void |
FinalLocalVariableCheck.leaveToken(DetailAST ast) |
void |
EqualsAvoidNullCheck.leaveToken(DetailAST ast) |
void |
DeclarationOrderCheck.leaveToken(DetailAST ast) |
void |
AbstractSuperCheck.leaveToken(DetailAST ast) |
void |
IllegalTypeCheck.visitToken(DetailAST ast) |
void |
FallThroughCheck.visitToken(DetailAST ast) |
void |
VariableDeclarationUsageDistanceCheck.visitToken(DetailAST ast) |
void |
UnnecessaryParenthesesCheck.visitToken(DetailAST ast) |
void |
StringLiteralEqualityCheck.visitToken(DetailAST ast) |
void |
SimplifyBooleanReturnCheck.visitToken(DetailAST ast) |
void |
SimplifyBooleanExpressionCheck.visitToken(DetailAST ast) |
void |
ReturnCountCheck.visitToken(DetailAST ast) |
void |
RequireThisCheck.visitToken(DetailAST ast) |
void |
ParameterAssignmentCheck.visitToken(DetailAST ast) |
void |
PackageDeclarationCheck.visitToken(DetailAST ast) |
void |
OverloadMethodsDeclarationOrderCheck.visitToken(DetailAST ast) |
void |
OneStatementPerLineCheck.visitToken(DetailAST ast) |
void |
NoFinalizerCheck.visitToken(DetailAST aAST) |
void |
NoCloneCheck.visitToken(DetailAST aAST) |
void |
NestedTryDepthCheck.visitToken(DetailAST literalTry) |
void |
NestedIfDepthCheck.visitToken(DetailAST literalIf) |
void |
NestedForDepthCheck.visitToken(DetailAST ast) |
void |
MultipleVariableDeclarationsCheck.visitToken(DetailAST ast) |
void |
MultipleStringLiteralsCheck.visitToken(DetailAST ast) |
void |
ModifiedControlVariableCheck.visitToken(DetailAST ast) |
void |
MissingSwitchDefaultCheck.visitToken(DetailAST ast) |
void |
MissingCtorCheck.visitToken(DetailAST ast) |
void |
MagicNumberCheck.visitToken(DetailAST ast) |
void |
InnerAssignmentCheck.visitToken(DetailAST ast) |
void |
IllegalTokenTextCheck.visitToken(DetailAST ast) |
void |
IllegalTokenCheck.visitToken(DetailAST ast) |
void |
IllegalThrowsCheck.visitToken(DetailAST detailAST) |
void |
IllegalInstantiationCheck.visitToken(DetailAST ast) |
void |
IllegalCatchCheck.visitToken(DetailAST detailAST) |
void |
HiddenFieldCheck.visitToken(DetailAST ast) |
void |
FinalLocalVariableCheck.visitToken(DetailAST ast) |
void |
ExplicitInitializationCheck.visitToken(DetailAST ast) |
void |
EqualsHashCodeCheck.visitToken(DetailAST ast) |
void |
EqualsAvoidNullCheck.visitToken(DetailAST ast) |
void |
EmptyStatementCheck.visitToken(DetailAST ast) |
void |
DefaultComesLastCheck.visitToken(DetailAST ast) |
void |
DeclarationOrderCheck.visitToken(DetailAST ast) |
void |
CovariantEqualsCheck.visitToken(DetailAST ast) |
void |
AvoidInlineConditionalsCheck.visitToken(DetailAST ast) |
void |
ArrayTrailingCommaCheck.visitToken(DetailAST arrayInit) |
void |
AbstractSuperCheck.visitToken(DetailAST ast) |
Constructor and Description |
---|
CatchFrame(com.puppycrawl.tools.checkstyle.checks.coding.RequireThisCheck.AbstractFrame parent,
DetailAST ident)
Creates catch frame.
|
ForFrame(com.puppycrawl.tools.checkstyle.checks.coding.RequireThisCheck.AbstractFrame parent,
DetailAST ident)
Creates for frame.
|
Modifier and Type | Method and Description |
---|---|
void |
VisibilityModifierCheck.beginTree(DetailAST rootAst) |
void |
OneTopLevelClassCheck.beginTree(DetailAST rootAST) |
void |
FinalClassCheck.beginTree(DetailAST rootAST) |
void |
OneTopLevelClassCheck.finishTree(DetailAST rootAST) |
void |
MutableExceptionCheck.leaveToken(DetailAST ast) |
void |
InnerTypeLastCheck.leaveToken(DetailAST ast) |
void |
FinalClassCheck.leaveToken(DetailAST ast) |
void |
VisibilityModifierCheck.visitToken(DetailAST ast) |
void |
ThrowsCountCheck.visitToken(DetailAST ast) |
void |
MutableExceptionCheck.visitToken(DetailAST ast) |
void |
InterfaceIsTypeCheck.visitToken(DetailAST ast) |
void |
InnerTypeLastCheck.visitToken(DetailAST ast) |
void |
HideUtilityClassConstructorCheck.visitToken(DetailAST ast) |
void |
FinalClassCheck.visitToken(DetailAST ast) |
void |
DesignForExtensionCheck.visitToken(DetailAST ast) |
Modifier and Type | Method and Description |
---|---|
void |
UnusedImportsCheck.beginTree(DetailAST rootAST) |
void |
RedundantImportCheck.beginTree(DetailAST aRootAST) |
void |
ImportOrderCheck.beginTree(DetailAST rootAST) |
void |
ImportControlCheck.beginTree(DetailAST rootAST) |
void |
CustomImportOrderCheck.beginTree(DetailAST rootAST) |
void |
UnusedImportsCheck.finishTree(DetailAST rootAST) |
void |
CustomImportOrderCheck.finishTree(DetailAST rootAST) |
void |
UnusedImportsCheck.visitToken(DetailAST ast) |
void |
RedundantImportCheck.visitToken(DetailAST ast) |
void |
ImportOrderCheck.visitToken(DetailAST ast) |
void |
ImportControlCheck.visitToken(DetailAST ast) |
void |
IllegalImportCheck.visitToken(DetailAST ast) |
void |
CustomImportOrderCheck.visitToken(DetailAST ast) |
void |
AvoidStaticImportCheck.visitToken(DetailAST ast) |
void |
AvoidStarImportCheck.visitToken(DetailAST ast) |
Modifier and Type | Method and Description |
---|---|
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 |
BlockParentHandler.getLeftCurly()
Get the left curly brace portion of the expression we are handling.
|
protected DetailAST |
SwitchHandler.getLeftCurly() |
protected DetailAST |
SlistHandler.getLeftCurly() |
protected DetailAST |
ObjectBlockHandler.getLeftCurly() |
protected DetailAST |
ClassDefHandler.getLeftCurly() |
protected DetailAST |
ArrayInitHandler.getLeftCurly() |
protected DetailAST |
BlockParentHandler.getListChild()
Get the child element representing the list of statements.
|
protected DetailAST |
SwitchHandler.getListChild() |
protected DetailAST |
SlistHandler.getListChild() |
protected DetailAST |
ObjectBlockHandler.getListChild() |
protected DetailAST |
ClassDefHandler.getListChild() |
protected DetailAST |
ArrayInitHandler.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 |
SwitchHandler.getNonListChild() |
protected DetailAST |
ElseHandler.getNonListChild() |
protected DetailAST |
BlockParentHandler.getRightCurly()
Get the right curly brace portion of the expression we are handling.
|
protected DetailAST |
SwitchHandler.getRightCurly() |
protected DetailAST |
SlistHandler.getRightCurly() |
protected DetailAST |
ObjectBlockHandler.getRightCurly() |
protected DetailAST |
ClassDefHandler.getRightCurly() |
protected DetailAST |
ArrayInitHandler.getRightCurly() |
protected DetailAST |
BlockParentHandler.getTopLevelAst()
Get the top level expression being managed by this handler.
|
protected DetailAST |
SlistHandler.getTopLevelAst() |
protected DetailAST |
ObjectBlockHandler.getTopLevelAst() |
protected DetailAST |
MethodDefHandler.getTopLevelAst() |
protected DetailAST |
ClassDefHandler.getTopLevelAst() |
protected DetailAST |
ArrayInitHandler.getTopLevelAst() |
Modifier and Type | Method and Description |
---|---|
static boolean |
AbstractExpressionHandler.areOnSameLine(DetailAST ast1,
DetailAST ast2)
Determines if two expressions are on the same line.
|
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 including
firstNode and lastNode . |
protected void |
AbstractExpressionHandler.checkWrappingIndentation(DetailAST firstNode,
DetailAST lastNode,
int wrappedIndentLevel,
int startIndent,
boolean ignoreFirstLine)
Checks indentation on wrapped lines between and including
firstNode and lastNode . |
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 void |
AbstractExpressionHandler.findSubtreeLines(LineSet lines,
DetailAST tree,
boolean allowNesting)
Find the set of lines for a given subtree.
|
protected static int |
AbstractExpressionHandler.getFirstLine(int startLine,
DetailAST tree)
Get the first line for a 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.
|
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,
String subtypeName,
int actualIndent)
Log an indentation error.
|
protected void |
AbstractExpressionHandler.logError(DetailAST ast,
String subtypeName,
int actualIndent,
IndentLevel expectedIndent)
Log an indentation error.
|
void |
IndentationCheck.visitToken(DetailAST ast) |
void |
CommentsIndentationCheck.visitToken(DetailAST commentAst) |
Constructor and Description |
---|
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.
|
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.
|
Modifier and Type | Method and Description |
---|---|
protected DetailAST |
AbstractJavadocCheck.getBlockCommentAst()
Getter for block comment in Java language syntax tree.
|
Modifier and Type | Method and Description |
---|---|
void |
AbstractTypeAwareCheck.beginTree(DetailAST rootAST)
Deprecated.
|
void |
AbstractJavadocCheck.beginTree(DetailAST rootAST) |
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 |
AbstractTypeAwareCheck.leaveToken(DetailAST ast)
Deprecated.
|
protected void |
JavadocMethodCheck.processAST(DetailAST ast) |
protected abstract void |
AbstractTypeAwareCheck.processAST(DetailAST ast)
Deprecated.
Called to process an AST when visiting it.
|
void |
WriteTagCheck.visitToken(DetailAST ast) |
void |
JavadocVariableCheck.visitToken(DetailAST ast) |
void |
JavadocTypeCheck.visitToken(DetailAST ast) |
void |
JavadocStyleCheck.visitToken(DetailAST ast) |
void |
AbstractTypeAwareCheck.visitToken(DetailAST ast)
Deprecated.
|
void |
AbstractJavadocCheck.visitToken(DetailAST blockCommentNode) |
Modifier and Type | Method and Description |
---|---|
void |
NPathComplexityCheck.beginTree(DetailAST rootAST) |
void |
JavaNCSSCheck.beginTree(DetailAST rootAST) |
void |
AbstractClassCouplingCheck.beginTree(DetailAST ast) |
void |
JavaNCSSCheck.finishTree(DetailAST rootAST) |
void |
NPathComplexityCheck.leaveToken(DetailAST ast) |
void |
JavaNCSSCheck.leaveToken(DetailAST ast) |
void |
CyclomaticComplexityCheck.leaveToken(DetailAST ast) |
void |
BooleanExpressionComplexityCheck.leaveToken(DetailAST ast) |
void |
AbstractClassCouplingCheck.leaveToken(DetailAST ast) |
void |
NPathComplexityCheck.visitToken(DetailAST ast) |
void |
JavaNCSSCheck.visitToken(DetailAST ast) |
void |
CyclomaticComplexityCheck.visitToken(DetailAST ast) |
void |
BooleanExpressionComplexityCheck.visitToken(DetailAST ast) |
void |
AbstractClassCouplingCheck.visitToken(DetailAST ast) |
Modifier and Type | Method and Description |
---|---|
void |
RedundantModifierCheck.visitToken(DetailAST ast) |
void |
ModifierOrderCheck.visitToken(DetailAST ast) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
StaticVariableNameCheck.mustCheckName(DetailAST ast) |
protected boolean |
ParameterNameCheck.mustCheckName(DetailAST ast) |
protected boolean |
MethodTypeParameterNameCheck.mustCheckName(DetailAST ast) |
protected boolean |
MemberNameCheck.mustCheckName(DetailAST ast) |
protected boolean |
LocalVariableNameCheck.mustCheckName(DetailAST ast) |
protected boolean |
LocalFinalVariableNameCheck.mustCheckName(DetailAST ast) |
protected boolean |
InterfaceTypeParameterNameCheck.mustCheckName(DetailAST ast) |
protected boolean |
ConstantNameCheck.mustCheckName(DetailAST ast) |
protected boolean |
ClassTypeParameterNameCheck.mustCheckName(DetailAST ast) |
protected boolean |
CatchParameterNameCheck.mustCheckName(DetailAST ast) |
protected boolean |
AbstractTypeParameterNameCheck.mustCheckName(DetailAST ast)
Deprecated.
|
protected abstract boolean |
AbstractNameCheck.mustCheckName(DetailAST ast)
Decides whether the name of an AST should be checked against
the format regexp.
|
protected boolean |
AbstractAccessControlNameCheck.mustCheckName(DetailAST ast) |
protected boolean |
AbstractAccessControlNameCheck.shouldCheckInScope(DetailAST modifiers)
Should we check member with given modifiers.
|
void |
PackageNameCheck.visitToken(DetailAST ast) |
void |
MethodNameCheck.visitToken(DetailAST ast) |
void |
AbstractNameCheck.visitToken(DetailAST ast) |
void |
AbstractClassNameCheck.visitToken(DetailAST ast) |
void |
AbbreviationAsWordInNameCheck.visitToken(DetailAST ast) |
Modifier and Type | Method and Description |
---|---|
void |
RegexpSinglelineJavaCheck.beginTree(DetailAST rootAST) |
void |
RegexpCheck.beginTree(DetailAST rootAST) |
Modifier and Type | Method and Description |
---|---|
void |
OuterTypeNumberCheck.beginTree(DetailAST ast) |
void |
LineLengthCheck.beginTree(DetailAST rootAST) |
void |
ExecutableStatementCountCheck.beginTree(DetailAST rootAST) |
void |
OuterTypeNumberCheck.finishTree(DetailAST ast) |
void |
OuterTypeNumberCheck.leaveToken(DetailAST ast) |
void |
MethodCountCheck.leaveToken(DetailAST ast) |
void |
ExecutableStatementCountCheck.leaveToken(DetailAST ast) |
void |
ParameterNumberCheck.visitToken(DetailAST ast) |
void |
OuterTypeNumberCheck.visitToken(DetailAST ast) |
void |
MethodLengthCheck.visitToken(DetailAST ast) |
void |
MethodCountCheck.visitToken(DetailAST ast) |
void |
ExecutableStatementCountCheck.visitToken(DetailAST ast) |
void |
AnonInnerLengthCheck.visitToken(DetailAST ast) |
Modifier and Type | Method and Description |
---|---|
void |
SingleSpaceSeparatorCheck.beginTree(DetailAST rootAST) |
void |
GenericWhitespaceCheck.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 |
WhitespaceAroundCheck.visitToken(DetailAST ast) |
void |
WhitespaceAfterCheck.visitToken(DetailAST ast) |
void |
TypecastParenPadCheck.visitToken(DetailAST ast) |
void |
SeparatorWrapCheck.visitToken(DetailAST ast) |
void |
ParenPadCheck.visitToken(DetailAST ast) |
void |
OperatorWrapCheck.visitToken(DetailAST ast) |
void |
NoWhitespaceBeforeCheck.visitToken(DetailAST ast) |
void |
NoWhitespaceAfterCheck.visitToken(DetailAST ast) |
void |
NoLineWrapCheck.visitToken(DetailAST ast) |
void |
MethodParamPadCheck.visitToken(DetailAST ast) |
void |
GenericWhitespaceCheck.visitToken(DetailAST ast) |
void |
EmptyLineSeparatorCheck.visitToken(DetailAST ast) |
void |
EmptyForIteratorPadCheck.visitToken(DetailAST ast) |
void |
EmptyForInitializerPadCheck.visitToken(DetailAST ast) |
Modifier and Type | Method and Description |
---|---|
protected void |
ParseTreeTablePresentation.setParseTree(DetailAST parseTree)
Set parse tree.
|
protected void |
ParseTreeTableModel.setParseTree(DetailAST parseTree)
Sets parse tree.
|
Constructor and Description |
---|
CodeSelectorPresentation(DetailAST ast,
com.google.common.collect.ImmutableList<Integer> lines2position)
Constructor.
|
ParseTreeTableModel(DetailAST parseTree)
Initialise pModel.
|
ParseTreeTablePresentation(DetailAST parseTree)
Constructor initialise root node.
|
Modifier and Type | Method and Description |
---|---|
static DetailAST |
CommonUtils.createBlockCommentNode(String content)
Create block comment from string content.
|
static DetailAST |
CommonUtils.createBlockCommentNode(antlr.Token token)
Create block comment from token.
|
static DetailAST |
AnnotationUtility.getAnnotation(DetailAST ast,
String annotation)
Checks to see if the AST is annotated with
the passed in annotation and return the AST
representing that annotation.
|
static DetailAST |
AnnotationUtility.getAnnotationHolder(DetailAST ast)
Gets the AST that holds a series of annotations for the
potentially annotated AST.
|
static DetailAST |
CheckUtils.getFirstNode(DetailAST node)
Finds sub-node for given node minimal (line, column) pair.
|
Modifier and Type | Method and Description |
---|---|
static Optional<DetailAST> |
TokenUtils.findFirstTokenByPredicate(DetailAST root,
Predicate<DetailAST> predicate)
|
static List<DetailAST> |
CheckUtils.getTypeParameters(DetailAST node)
Retrieves the type parameters to the node.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
AnnotationUtility.containsAnnotation(DetailAST ast)
Checks to see if the AST is annotated with
any annotation.
|
static boolean |
AnnotationUtility.containsAnnotation(DetailAST ast,
String annotation)
Checks to see if the AST is annotated with
the passed in annotation.
|
static FullIdent |
CheckUtils.createFullType(DetailAST typeAST)
Creates
FullIdent for given type node. |
static Optional<DetailAST> |
TokenUtils.findFirstTokenByPredicate(DetailAST root,
Predicate<DetailAST> predicate)
|
static AccessModifier |
CheckUtils.getAccessModifierFromModifiersToken(DetailAST modifiersToken)
Returns
AccessModifier based on the information about access modifier
taken from the given token of type TokenTypes.MODIFIERS . |
static DetailAST |
AnnotationUtility.getAnnotation(DetailAST ast,
String annotation)
Checks to see if the AST is annotated with
the passed in annotation and return the AST
representing that annotation.
|
static DetailAST |
AnnotationUtility.getAnnotationHolder(DetailAST ast)
Gets the AST that holds a series of annotations for the
potentially annotated AST.
|
static DetailAST |
CheckUtils.getFirstNode(DetailAST node)
Finds sub-node for given node minimal (line, column) pair.
|
static String |
JavadocUtils.getJavadocCommentContent(DetailAST javadocCommentBegin)
Get content of Javadoc comment.
|
static Scope |
ScopeUtils.getScopeFromMods(DetailAST aMods)
Returns the Scope specified by the modifier set.
|
static Scope |
ScopeUtils.getSurroundingScope(DetailAST node)
Returns the scope of the surrounding "block".
|
static List<String> |
CheckUtils.getTypeParameterNames(DetailAST node)
Retrieves the names of the type parameters to the node.
|
static List<DetailAST> |
CheckUtils.getTypeParameters(DetailAST node)
Retrieves the type parameters to the node.
|
static boolean |
ScopeUtils.isClassFieldDef(DetailAST node)
Determines whether a node is a class field definition.
|
static boolean |
CheckUtils.isElseIf(DetailAST ast)
Returns whether a token represents an ELSE as part of an ELSE / IF set.
|
static boolean |
CheckUtils.isEqualsMethod(DetailAST ast)
Tests whether a method definition AST defines an equals covariant.
|
static boolean |
CheckUtils.isGetterMethod(DetailAST ast)
Returns whether an AST represents a getter method.
|
static boolean |
ScopeUtils.isInAnnotationBlock(DetailAST node)
Returns whether a node is directly contained within an annotation block.
|
static boolean |
ScopeUtils.isInCodeBlock(DetailAST node)
Returns whether the scope of a node is restricted to a code block.
|
static boolean |
ScopeUtils.isInEnumBlock(DetailAST node)
Returns whether a node is directly contained within an enum block.
|
static boolean |
ScopeUtils.isInInterfaceBlock(DetailAST node)
Returns whether a node is directly contained within an interface block.
|
static boolean |
ScopeUtils.isInInterfaceOrAnnotationBlock(DetailAST node)
Returns whether a node is directly contained within an interface or
annotation block.
|
static boolean |
ScopeUtils.isInScope(DetailAST ast,
Scope scope)
Checks whether ast node is in a specific scope.
|
static boolean |
JavadocUtils.isJavadocComment(DetailAST blockCommentBegin)
Checks block comment content starts with '*' javadoc comment identifier.
|
static boolean |
ScopeUtils.isLocalVariableDef(DetailAST node)
Determines whether a node is a local variable definition.
|
static boolean |
CheckUtils.isNonVoidMethod(DetailAST methodDefAst)
Checks whether a method is a not void one.
|
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.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.isOnType(DetailAST blockComment)
Node is on type definition.
|
static boolean |
ScopeUtils.isOuterMostType(DetailAST node)
Returns whether a node is contained in the outer most type block.
|
static boolean |
CheckUtils.isReceiverParameter(DetailAST parameterDefAst)
Checks whether a parameter is a receiver.
|
static boolean |
CheckUtils.isSetterMethod(DetailAST ast)
Returns whether an AST represents a setter method.
|
Modifier and Type | Method and Description |
---|---|
static Optional<DetailAST> |
TokenUtils.findFirstTokenByPredicate(DetailAST root,
Predicate<DetailAST> predicate)
|
Modifier and Type | Method and Description |
---|---|
DetailAST |
RootNode.getUnderlyingNode()
Returns underlying node.
|
DetailAST |
ElementNode.getUnderlyingNode()
Returns underlying node.
|
DetailAST |
AttributeNode.getUnderlyingNode()
Returns underlying node.
|
abstract DetailAST |
AbstractNode.getUnderlyingNode()
Returns underlying node.
|
Constructor and Description |
---|
ElementNode(AbstractNode root,
AbstractNode parent,
DetailAST detailAst)
Creates a new
ElementNode instance. |
RootNode(DetailAST detailAst)
Creates a new
RootNode instance. |
XpathQueryGenerator(DetailAST rootAst,
int lineNumber,
int columnNumber,
FileText fileText,
int tabWidth)
Creates a new
XpathQueryGenerator instance. |
Copyright © 2001–2018. All rights reserved.