Class TargetType
java.lang.Object
com.google.errorprone.util.TargetType
An expression's target type, see
targetType(VisitorState)
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract TreePath
path()
static @Nullable TargetType
targetType
(VisitorState state) Returns the target type of the tree at the givenVisitorState
's path, or elsenull
.abstract com.sun.tools.javac.code.Type
type()
-
Constructor Details
-
TargetType
public TargetType()
-
-
Method Details
-
targetType
Returns the target type of the tree at the givenVisitorState
's path, or elsenull
.For example, the target type of an assignment expression is the variable's type, and the target type of a return statement is the enclosing method's type.
A general mental model is that the target type of an expression where the value is used is the highest supertype that you could cast to and still have this compile.
-
type
public abstract com.sun.tools.javac.code.Type type() -
path
-