Interface ExprMirror.MethodRefMirror
-
- All Superinterfaces:
ExprMirror
,ExprMirror.FunctionalExprMirror
,ExprMirror.PolyExprMirror
- Enclosing interface:
- ExprMirror
public static interface ExprMirror.MethodRefMirror extends ExprMirror.FunctionalExprMirror
Mirror of a method reference expression.
-
-
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 Modifier and Type Method Description @Nullable JMethodSig
getCachedExactMethod()
UNRESOLVED_METHOD if not yet computed, null if computed but inexact, otherwise the real method.@NonNull List<JTypeMirror>
getExplicitTypeArguments()
Returns the explicit type arguments (the ones to the right of the "::").@Nullable JTypeMirror
getLhsIfType()
Returns the type of the left hand-side, if it is not an expression.String
getMethodName()
Returns the name of the invoked method, orJConstructorSymbol.CTOR_NAME
if this is a constructor reference.JTypeMirror
getTypeToSearch()
Returns the type to search as defined by the first section of JLS§15.13.1 , except it may also return an array type (the jls makes an exception for it, while we don't).boolean
isConstructorRef()
True if this references a ctor.void
setCachedExactMethod(@Nullable JMethodSig sig)
void
setCompileTimeDecl(JMethodSig methodType)
This is the method that is referenced.-
Methods inherited from interface net.sourceforge.pmd.lang.java.types.internal.infer.ExprMirror
finishStandaloneInference, getInferredType, getLocation, getStandaloneSpecies, getTypingContext, isEquivalentToUnderlyingAst
-
Methods inherited from interface net.sourceforge.pmd.lang.java.types.internal.infer.ExprMirror.FunctionalExprMirror
setFunctionalMethod, setInferredType
-
Methods inherited from interface net.sourceforge.pmd.lang.java.types.internal.infer.ExprMirror.PolyExprMirror
getEnclosingType, getStandaloneType, unresolvedType
-
-
-
-
Method Detail
-
isConstructorRef
boolean isConstructorRef()
True if this references a ctor.
-
getTypeToSearch
JTypeMirror getTypeToSearch()
Returns the type to search as defined by the first section of JLS§15.13.1 , except it may also return an array type (the jls makes an exception for it, while we don't).
-
getLhsIfType
@Nullable JTypeMirror getLhsIfType()
Returns the type of the left hand-side, if it is not an expression. Note that the following qualifier super forms are considered "expressions", that have a context-dependent type (depends on the type of thethis
expr):super :: [TypeArguments] Identifier TypeName.super :: [TypeArguments] Identifier
-
getMethodName
String getMethodName()
Returns the name of the invoked method, orJConstructorSymbol.CTOR_NAME
if this is a constructor reference.
-
getExplicitTypeArguments
@NonNull List<JTypeMirror> getExplicitTypeArguments()
Returns the explicit type arguments (the ones to the right of the "::").
-
setCompileTimeDecl
void setCompileTimeDecl(JMethodSig methodType)
This is the method that is referenced. E.g. instringStream.map(String::isEmpty)
, this isjava.lang.String.isEmpty() -> boolean
-
getCachedExactMethod
@Nullable JMethodSig getCachedExactMethod()
UNRESOLVED_METHOD if not yet computed, null if computed but inexact, otherwise the real method.
-
setCachedExactMethod
void setCachedExactMethod(@Nullable JMethodSig sig)
-
-