Interface ASTPattern
-
- All Superinterfaces:
JavaNode
,Node
,ScopedNode
- All Known Implementing Classes:
ASTGuardedPattern
,ASTRecordPattern
,ASTTypePattern
public interface ASTPattern extends JavaNode
A pattern (for pattern matching constructs likeInstanceOfExpression
or within aASTSwitchLabel
). This is a JDK 16 feature.This interface is implemented by all forms of patterns.
Pattern ::= TypePattern | RecordPattern
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
getParenthesisDepth()
Returns the number of parenthesis levels around this pattern.-
Methods inherited from interface net.sourceforge.pmd.lang.java.ast.JavaNode
children, childrenAccept, getChild, getParent, getRoot, jjtAccept, setScope
-
Methods inherited from interface net.sourceforge.pmd.lang.ast.Node
findChildNodesWithXPath, findChildrenOfType, findDescendantsOfType, findDescendantsOfType, findDescendantsOfType, getAsDocument, getBeginColumn, getBeginLine, getDataFlowNode, getEndColumn, getEndLine, getFirstChildOfType, getFirstDescendantOfType, getFirstParentOfAnyType, getFirstParentOfType, getImage, getIndexInParent, getNthParent, getNumChildren, getParentsOfType, getUserData, getUserMap, getXPathAttributesIterator, getXPathNodeName, hasDescendantMatchingXPath, hasDescendantOfType, hasImageEqualTo, isFindBoundary, jjtAddChild, jjtClose, jjtGetChild, jjtGetChildIndex, jjtGetId, jjtGetNumChildren, jjtGetParent, jjtOpen, jjtSetChildIndex, jjtSetParent, remove, removeChildAtIndex, setDataFlowNode, setImage, setUserData
-
Methods inherited from interface net.sourceforge.pmd.lang.symboltable.ScopedNode
getScope
-
-
-
-
Method Detail
-
getParenthesisDepth
@Experimental int getParenthesisDepth()
Returns the number of parenthesis levels around this pattern. If this method returns 0, then no parentheses are present.
-
-