Class ASTPath
java.lang.Object
org.checkerframework.afu.scenelib.io.ASTPath
- All Implemented Interfaces:
Comparable<ASTPath>,Iterable<ASTPath.ASTEntry>
A path through the AST.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Method Summary
Modifier and TypeMethodDescriptionadd(ASTPath.ASTEntry entry) intstatic ASTPathempty()booleanbooleanextend(ASTPath.ASTEntry entry) extendNewArray(int depth) get(int index) Return the index-th element of this stack.static Comparator<ASTPath> getLast()inthashCode()static booleanisBinaryOperator(Tree.Kind kind) Determines if the given kind is a binary operator.static booleanisClassEquiv(Tree.Kind kind) static booleanDetermines if the given kind is a compound assignment.static booleanisDeclaration(Tree.Kind kind) Determines if the given kind is a declaration.booleanisEmpty()static booleanReturns true if anASTPathcan identify nodes of the given kind.static booleanstatic booleanisTypeKind(Tree.Kind kind) static booleanisTypeSelector(String selector) static booleanisUnaryOperator(Tree.Kind kind) Determines if the given kind is a unary operator.static booleanisWildcard(Tree.Kind kind) Determines if the given kind is a wildcard.iterator()booleanReturns true if thisASTPathmatches a givenTreePath.newArrayLevel(int depth) static ASTPathCreate a newASTPathfrom a formatted string description.peek()org.checkerframework.afu.scenelib.io.ImmutableStack<ASTPath.ASTEntry> pop()org.checkerframework.afu.scenelib.io.ImmutableStack<ASTPath.ASTEntry> push(ASTPath.ASTEntry elem) intsize()toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
ANNOTATION
- See Also:
-
ARGUMENT
- See Also:
-
BLOCK
- See Also:
-
BODY
- See Also:
-
BOUND
- See Also:
-
CASE
- See Also:
-
CATCH
- See Also:
-
CLASS_BODY
- See Also:
-
CONDITION
- See Also:
-
DETAIL
- See Also:
-
DIMENSION
- See Also:
-
ELSE_STATEMENT
- See Also:
-
ENCLOSING_EXPRESSION
- See Also:
-
EXPRESSION
- See Also:
-
FALSE_EXPRESSION
- See Also:
-
FINALLY_BLOCK
- See Also:
-
IDENTIFIER
- See Also:
-
INDEX
- See Also:
-
INITIALIZER
- See Also:
-
LEFT_OPERAND
- See Also:
-
METHOD_SELECT
- See Also:
-
MODIFIERS
- See Also:
-
PARAMETER
- See Also:
-
QUALIFIER_EXPRESSION
- See Also:
-
RESOURCE
- See Also:
-
RIGHT_OPERAND
- See Also:
-
STATEMENT
- See Also:
-
THEN_STATEMENT
- See Also:
-
THROWS
- See Also:
-
TRUE_EXPRESSION
- See Also:
-
TYPE
- See Also:
-
TYPE_ALTERNATIVE
- See Also:
-
TYPE_ARGUMENT
- See Also:
-
TYPE_PARAMETER
- See Also:
-
UNDERLYING_TYPE
- See Also:
-
UPDATE
- See Also:
-
VARIABLE
- See Also:
-
-
Method Details
-
empty
-
getComparator
-
iterator
- Specified by:
iteratorin interfaceIterable<ASTPath.ASTEntry>
-
extendNewArray
-
newArrayLevel
-
add
-
extend
-
getParentPath
-
getLast
-
parse
Create a newASTPathfrom a formatted string description.- Parameters:
s- formatted string as in JAIFinsert-\{cast,annotation\}- Returns:
- the corresponding
ASTPath - Throws:
ParseException- if there is trouble parsing the string
-
matches
Returns true if thisASTPathmatches a givenTreePath. -
isTypeSelector
-
isClassEquiv
-
isCompoundAssignment
Determines if the given kind is a compound assignment.- Parameters:
kind- the kind to test- Returns:
- true if the given kind is a compound assignment
-
isUnaryOperator
Determines if the given kind is a unary operator.- Parameters:
kind- the kind to test- Returns:
- true if the given kind is a unary operator
-
isBinaryOperator
Determines if the given kind is a binary operator.- Parameters:
kind- the kind to test- Returns:
- true if the given kind is a binary operator
-
isLiteral
-
isTypeKind
-
isWildcard
Determines if the given kind is a wildcard.- Parameters:
kind- the kind to test- Returns:
- true if the given kind is a wildcard
-
isDeclaration
Determines if the given kind is a declaration.- Parameters:
kind- the kind to test- Returns:
- true if the given kind is a declaration
-
isHandled
Returns true if anASTPathcan identify nodes of the given kind.- Parameters:
kind- the kind to test- Returns:
- true if the given kind can be identified by an
ASTPath
-
hashCode
public int hashCode() -
equals
-
equals
-
compareTo
- Specified by:
compareToin interfaceComparable<ASTPath>
-
toString
-
isEmpty
public boolean isEmpty() -
peek
-
pop
-
push
public org.checkerframework.afu.scenelib.io.ImmutableStack<ASTPath.ASTEntry> push(ASTPath.ASTEntry elem) -
size
public int size() -
get
Return the index-th element of this stack.
-