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 String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
-
Method Summary
Modifier and TypeMethodDescriptionadd
(ASTPath.ASTEntry entry) int
static ASTPath
empty()
boolean
boolean
extend
(ASTPath.ASTEntry entry) extendNewArray
(int depth) get
(int index) Return the index-th element of this stack.static Comparator
<ASTPath> getLast()
int
hashCode()
static boolean
isBinaryOperator
(Tree.Kind kind) Determines if the given kind is a binary operator.static boolean
isClassEquiv
(Tree.Kind kind) static boolean
Determines if the given kind is a compound assignment.static boolean
isDeclaration
(Tree.Kind kind) Determines if the given kind is a declaration.boolean
isEmpty()
static boolean
Returns true if anASTPath
can identify nodes of the given kind.static boolean
static boolean
isTypeKind
(Tree.Kind kind) static boolean
isTypeSelector
(String selector) static boolean
isUnaryOperator
(Tree.Kind kind) Determines if the given kind is a unary operator.static boolean
isWildcard
(Tree.Kind kind) Determines if the given kind is a wildcard.iterator()
boolean
Returns true if thisASTPath
matches a givenTreePath
.newArrayLevel
(int depth) static ASTPath
Create a newASTPath
from 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) int
size()
toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods 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:
iterator
in interfaceIterable<ASTPath.ASTEntry>
-
extendNewArray
-
newArrayLevel
-
add
-
extend
-
getParentPath
-
getLast
-
parse
Create a newASTPath
from 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 thisASTPath
matches 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 anASTPath
can 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:
compareTo
in 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.
-