Class UnderlyingAST
- java.lang.Object
-
- org.checkerframework.dataflow.cfg.UnderlyingAST
-
- All Implemented Interfaces:
org.plumelib.util.UniqueId
- Direct Known Subclasses:
UnderlyingAST.CFGLambda
,UnderlyingAST.CFGMethod
,UnderlyingAST.CFGStatement
public abstract class UnderlyingAST extends java.lang.Object implements org.plumelib.util.UniqueId
Represents an abstract syntax tree of typeTree
that underlies a given control flow graph.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
UnderlyingAST.CFGLambda
If the underlying AST is a lambda.static class
UnderlyingAST.CFGMethod
If the underlying AST is a method.static class
UnderlyingAST.CFGStatement
If the underlying AST is a statement or expression.static class
UnderlyingAST.Kind
The kinds of underlying ASTs.
-
Field Summary
Fields Modifier and Type Field Description protected UnderlyingAST.Kind
kind
The kind of the underlying AST.
-
Constructor Summary
Constructors Modifier Constructor Description protected
UnderlyingAST(UnderlyingAST.Kind kind)
Creates an UnderlyingAST.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract com.sun.source.tree.Tree
getCode()
Returns the code that corresponds to the CFG.UnderlyingAST.Kind
getKind()
long
getUid()
-
-
-
Field Detail
-
kind
protected final UnderlyingAST.Kind kind
The kind of the underlying AST.
-
-
Constructor Detail
-
UnderlyingAST
protected UnderlyingAST(UnderlyingAST.Kind kind)
Creates an UnderlyingAST.- Parameters:
kind
- the kind of the AST
-
-
Method Detail
-
getUid
public long getUid(@UnknownInitialization UnderlyingAST this)
- Specified by:
getUid
in interfaceorg.plumelib.util.UniqueId
-
getCode
public abstract com.sun.source.tree.Tree getCode()
Returns the code that corresponds to the CFG. For a method or lamdda, this returns the body. For other constructs, it returns the tree itself (a statement or expression).- Returns:
- the code that corresponds to the CFG
-
getKind
public UnderlyingAST.Kind getKind()
-
-