Interface ExprMirror.PolyExprMirror
-
- All Superinterfaces:
ExprMirror
- All Known Subinterfaces:
ExprMirror.BranchingMirror
,ExprMirror.CtorInvocationMirror
,ExprMirror.FunctionalExprMirror
,ExprMirror.InvocationMirror
,ExprMirror.LambdaExprMirror
,ExprMirror.MethodRefMirror
- Enclosing interface:
- ExprMirror
public static interface ExprMirror.PolyExprMirror extends ExprMirror
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.sourceforge.pmd.lang.java.types.internal.infer.ExprMirror
ExprMirror.BranchingMirror, ExprMirror.CtorInvocationMirror, ExprMirror.FunctionalExprMirror, ExprMirror.InvocationMirror, ExprMirror.LambdaExprMirror, ExprMirror.MethodRefMirror, ExprMirror.PolyExprMirror, ExprMirror.TypeSpecies
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description @NonNull JClassType
getEnclosingType()
Returns the class declaration wherein this invocation occurs.default @Nullable JTypeMirror
getStandaloneType()
If this expression is of a standalone form, returns the type of the expression.default @Nullable JTypeMirror
unresolvedType()
If inference failed to determine the type of this node, returns a fallback for it.-
Methods inherited from interface net.sourceforge.pmd.lang.java.types.internal.infer.ExprMirror
finishStandaloneInference, getInferredType, getLocation, getStandaloneSpecies, getTypingContext, isEquivalentToUnderlyingAst, setInferredType
-
-
-
-
Method Detail
-
getEnclosingType
@NonNull JClassType getEnclosingType()
Returns the class declaration wherein this invocation occurs. Returns null if it's unresolved.
-
getStandaloneType
default @Nullable JTypeMirror getStandaloneType()
Description copied from interface:ExprMirror
If this expression is of a standalone form, returns the type of the expression. Otherwise returns null.Note that standalone types can directly be set on the type node.
- Specified by:
getStandaloneType
in interfaceExprMirror
- Returns:
- The type of the expression if it is standalone
-
unresolvedType
default @Nullable JTypeMirror unresolvedType()
If inference failed to determine the type of this node, returns a fallback for it. This should not query the context of the expression, or nodes whose type is unstable because it may be being inferred.If no fallback should be used, returns null.
-
-