Interface TypeInferenceLogger
-
- All Known Implementing Classes:
TypeInferenceLogger.SimpleLogger
,TypeInferenceLogger.VerboseLogger
public interface TypeInferenceLogger
A strategy to log the execution traces ofInfer
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
TypeInferenceLogger.SimpleLogger
static class
TypeInferenceLogger.VerboseLogger
This is mega verbose, should only be used for unit tests.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
ambiguityError(MethodCallSite site, @Nullable ExprMirror.InvocationMirror.MethodCtDecl selected, List<ExprMirror.InvocationMirror.MethodCtDecl> m1)
default void
boundAdded(net.sourceforge.pmd.lang.java.types.internal.infer.InferenceContext ctx, InferenceVar var, InferenceVar.BoundKind kind, JTypeMirror bound, boolean isSubstitution)
default void
ctxInitialization(net.sourceforge.pmd.lang.java.types.internal.infer.InferenceContext ctx, JMethodSig sig)
default void
endArg()
default void
endArgsChecks()
default void
endInference(@Nullable JMethodSig result)
default void
endReturnChecks()
default void
fallbackInvocation(JMethodSig ctdecl, MethodCallSite site)
default void
functionalExprNeedsInvocationCtx(JTypeMirror targetT, ExprMirror expr)
default boolean
isNoop()
default void
ivarInstantiated(net.sourceforge.pmd.lang.java.types.internal.infer.InferenceContext ctx, InferenceVar var, JTypeMirror inst)
default void
ivarMerged(net.sourceforge.pmd.lang.java.types.internal.infer.InferenceContext ctx, InferenceVar var, InferenceVar delegate)
default void
logResolutionFail(ResolutionFailure exception)
Log that the instantiation of the method type m for the given call site failed.TypeInferenceLogger
newInstance()
Return an instance for concurrent use in another thread.default void
noApplicableCandidates(MethodCallSite site)
default void
noCompileTimeDeclaration(MethodCallSite site)
static TypeInferenceLogger
noop()
default void
polyResolutionFailure(JavaNode node)
default void
propagateAndAbort(net.sourceforge.pmd.lang.java.types.internal.infer.InferenceContext context, net.sourceforge.pmd.lang.java.types.internal.infer.InferenceContext parent)
default void
skipArgAsNonPertinent(int i, ExprMirror expr)
default void
skipInstantiation(JMethodSig partiallyInferred, MethodCallSite site)
default void
startArg(int i, ExprMirror expr, JTypeMirror formal)
default void
startArgsChecks()
default void
startInference(JMethodSig sig, MethodCallSite site, net.sourceforge.pmd.lang.java.types.internal.infer.MethodResolutionPhase phase)
default void
startReturnChecks()
-
-
-
Method Detail
-
polyResolutionFailure
default void polyResolutionFailure(JavaNode node)
-
noApplicableCandidates
default void noApplicableCandidates(MethodCallSite site)
-
noCompileTimeDeclaration
default void noCompileTimeDeclaration(MethodCallSite site)
-
startInference
default void startInference(JMethodSig sig, MethodCallSite site, net.sourceforge.pmd.lang.java.types.internal.infer.MethodResolutionPhase phase)
-
endInference
default void endInference(@Nullable JMethodSig result)
-
fallbackInvocation
default void fallbackInvocation(JMethodSig ctdecl, MethodCallSite site)
-
skipInstantiation
default void skipInstantiation(JMethodSig partiallyInferred, MethodCallSite site)
-
ambiguityError
default void ambiguityError(MethodCallSite site, @Nullable ExprMirror.InvocationMirror.MethodCtDecl selected, List<ExprMirror.InvocationMirror.MethodCtDecl> m1)
-
ctxInitialization
default void ctxInitialization(net.sourceforge.pmd.lang.java.types.internal.infer.InferenceContext ctx, JMethodSig sig)
-
startArgsChecks
default void startArgsChecks()
-
startArg
default void startArg(int i, ExprMirror expr, JTypeMirror formal)
-
skipArgAsNonPertinent
default void skipArgAsNonPertinent(int i, ExprMirror expr)
-
functionalExprNeedsInvocationCtx
default void functionalExprNeedsInvocationCtx(JTypeMirror targetT, ExprMirror expr)
-
endArg
default void endArg()
-
endArgsChecks
default void endArgsChecks()
-
startReturnChecks
default void startReturnChecks()
-
endReturnChecks
default void endReturnChecks()
-
propagateAndAbort
default void propagateAndAbort(net.sourceforge.pmd.lang.java.types.internal.infer.InferenceContext context, net.sourceforge.pmd.lang.java.types.internal.infer.InferenceContext parent)
-
boundAdded
default void boundAdded(net.sourceforge.pmd.lang.java.types.internal.infer.InferenceContext ctx, InferenceVar var, InferenceVar.BoundKind kind, JTypeMirror bound, boolean isSubstitution)
-
ivarMerged
default void ivarMerged(net.sourceforge.pmd.lang.java.types.internal.infer.InferenceContext ctx, InferenceVar var, InferenceVar delegate)
-
ivarInstantiated
default void ivarInstantiated(net.sourceforge.pmd.lang.java.types.internal.infer.InferenceContext ctx, InferenceVar var, JTypeMirror inst)
-
logResolutionFail
default void logResolutionFail(ResolutionFailure exception)
Log that the instantiation of the method type m for the given call site failed. The exception provides a detail message. Such an event is perfectly normal and may happen repeatedly when performing overload resolution.Exceptions occuring in an
invocation phase
are compile-time errors though.- Parameters:
exception
- Failure record
-
isNoop
default boolean isNoop()
-
newInstance
TypeInferenceLogger newInstance()
Return an instance for concurrent use in another thread. If this is Noop, then return the same instance because it's thread-safe.
-
noop
static TypeInferenceLogger noop()
-
-