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.UniqueIdRepresents an abstract syntax tree of typeTreethat underlies a given control flow graph.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classUnderlyingAST.CFGLambdaIf the underlying AST is a lambda.static classUnderlyingAST.CFGMethodIf the underlying AST is a method.static classUnderlyingAST.CFGStatementIf the underlying AST is a statement or expression.static classUnderlyingAST.KindThe kinds of underlying ASTs.
-
Field Summary
Fields Modifier and Type Field Description protected UnderlyingAST.KindkindThe kind of the underlying AST.
-
Constructor Summary
Constructors Modifier Constructor Description protectedUnderlyingAST(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.TreegetCode()Returns the code that corresponds to the CFG.UnderlyingAST.KindgetKind()longgetUid()
-
-
-
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:
getUidin 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()
-
-