Class UnderlyingAST.CFGMethod
java.lang.Object
org.checkerframework.dataflow.cfg.UnderlyingAST
org.checkerframework.dataflow.cfg.UnderlyingAST.CFGMethod
- All Implemented Interfaces:
org.plumelib.util.UniqueId
- Enclosing class:
- UnderlyingAST
If the underlying AST is a method.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.checkerframework.dataflow.cfg.UnderlyingAST
UnderlyingAST.CFGLambda, UnderlyingAST.CFGMethod, UnderlyingAST.CFGStatement, UnderlyingAST.Kind -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final com.sun.source.tree.ClassTreeThe class tree this method belongs to.protected final com.sun.source.tree.MethodTreeThe method declaration.Fields inherited from class org.checkerframework.dataflow.cfg.UnderlyingAST
kind -
Constructor Summary
ConstructorsConstructorDescriptionCFGMethod(com.sun.source.tree.MethodTree method, com.sun.source.tree.ClassTree classTree) -
Method Summary
Modifier and TypeMethodDescriptioncom.sun.source.tree.ClassTreeReturns the class tree this method belongs to.com.sun.source.tree.TreegetCode()Returns the code that corresponds to the CFG.com.sun.source.tree.MethodTreeReturns the name of the method.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
-
Field Details
-
method
protected final com.sun.source.tree.MethodTree methodThe method declaration. -
classTree
protected final com.sun.source.tree.ClassTree classTreeThe class tree this method belongs to.
-
-
Constructor Details
-
CFGMethod
public CFGMethod(com.sun.source.tree.MethodTree method, com.sun.source.tree.ClassTree classTree)
-
-
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
-
getMethod
public com.sun.source.tree.MethodTree getMethod() -
getMethodName
Returns the name of the method.- Returns:
- the name of the method
-
getClassTree
public com.sun.source.tree.ClassTree getClassTree()Returns the class tree this method belongs to.- Returns:
- the class tree this method belongs to
-
getSimpleClassName
Returns the simple name of the enclosing class.- Returns:
- the simple name of the enclosing class
-
toString
-