Class UnderlyingAST.CFGLambda
java.lang.Object
org.checkerframework.dataflow.cfg.UnderlyingAST
org.checkerframework.dataflow.cfg.UnderlyingAST.CFGLambda
- All Implemented Interfaces:
org.plumelib.util.UniqueId
- Enclosing class:
- UnderlyingAST
If the underlying AST is a lambda.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.checkerframework.dataflow.cfg.UnderlyingAST
UnderlyingAST.CFGLambda, UnderlyingAST.CFGMethod, UnderlyingAST.CFGStatement, UnderlyingAST.Kind -
Field Summary
Fields inherited from class org.checkerframework.dataflow.cfg.UnderlyingAST
kind -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.sun.source.tree.ClassTreeReturns the enclosing class of the lambda.com.sun.source.tree.TreegetCode()Returns the code that corresponds to the CFG.@Nullable com.sun.source.tree.MethodTreeReturns the enclosing method of the lambda.Returns the name of the enclosing method of the lambda.com.sun.source.tree.LambdaExpressionTreeReturns the lambda expression tree.@Nullable com.sun.source.tree.MethodTreeDeprecated.use #getEnclosingMethod()Deprecated.use #getEnclosingMethodName()Returns the simple name of the enclosing class.toString()Methods inherited from class org.checkerframework.dataflow.cfg.UnderlyingAST
getKind, getUidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.plumelib.util.UniqueId
getClassAndUid
-
Constructor Details
-
CFGLambda
public CFGLambda(com.sun.source.tree.LambdaExpressionTree lambda, com.sun.source.tree.ClassTree classTree, @Nullable com.sun.source.tree.MethodTree enclosingMethod) Create a new CFGLambda.- Parameters:
lambda- the lambda expressionclassTree- the enclosing class of the lambdaenclosingMethod- the enclosing method of the lambda
-
-
Method Details
-
getCode
public com.sun.source.tree.Tree getCode()Description copied from class:UnderlyingASTReturns 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).- Specified by:
getCodein classUnderlyingAST- Returns:
- the code that corresponds to the CFG
-
getLambdaTree
public com.sun.source.tree.LambdaExpressionTree getLambdaTree()Returns the lambda expression tree.- Returns:
- the lambda expression tree
-
getClassTree
public com.sun.source.tree.ClassTree getClassTree()Returns the enclosing class of the lambda.- Returns:
- the enclosing class of the lambda
-
getSimpleClassName
Returns the simple name of the enclosing class.- Returns:
- the simple name of the enclosing class
-
getMethod
Deprecated.use #getEnclosingMethod()Returns the enclosing method of the lambda.- Returns:
- the enclosing method of the lambda, or
nullif there is no enclosing method
-
getEnclosingMethod
Returns the enclosing method of the lambda.- Returns:
- the enclosing method of the lambda, or
nullif there is no enclosing method
-
getMethodName
Deprecated.use #getEnclosingMethodName()Returns the name of the enclosing method of the lambda.- Returns:
- the name of the enclosing method of the lambda, or
nullif there is no enclosing method
-
getEnclosingMethodName
Returns the name of the enclosing method of the lambda.- Returns:
- the name of the enclosing method of the lambda, or
nullif there is no enclosing method
-
toString
-