Interface TypeInferenceLogger
-
- All Known Implementing Classes:
TypeInferenceLogger.SimpleLogger,TypeInferenceLogger.VerboseLogger
public interface TypeInferenceLoggerA strategy to log the execution traces ofInfer.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classTypeInferenceLogger.SimpleLoggerstatic classTypeInferenceLogger.VerboseLoggerThis 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 voidambiguityError(MethodCallSite site, @Nullable ExprMirror.InvocationMirror.MethodCtDecl selected, List<ExprMirror.InvocationMirror.MethodCtDecl> m1)default voidboundAdded(net.sourceforge.pmd.lang.java.types.internal.infer.InferenceContext ctx, InferenceVar var, InferenceVar.BoundKind kind, JTypeMirror bound, boolean isSubstitution)default voidctxInitialization(net.sourceforge.pmd.lang.java.types.internal.infer.InferenceContext ctx, JMethodSig sig)default voidendArg()default voidendArgsChecks()default voidendInference(@Nullable JMethodSig result)default voidendReturnChecks()default voidfallbackInvocation(JMethodSig ctdecl, MethodCallSite site)default voidfunctionalExprNeedsInvocationCtx(JTypeMirror targetT, ExprMirror expr)default booleanisNoop()default voidivarInstantiated(net.sourceforge.pmd.lang.java.types.internal.infer.InferenceContext ctx, InferenceVar var, JTypeMirror inst)default voidivarMerged(net.sourceforge.pmd.lang.java.types.internal.infer.InferenceContext ctx, InferenceVar var, InferenceVar delegate)default voidlogResolutionFail(ResolutionFailure exception)Log that the instantiation of the method type m for the given call site failed.TypeInferenceLoggernewInstance()Return an instance for concurrent use in another thread.default voidnoApplicableCandidates(MethodCallSite site)default voidnoCompileTimeDeclaration(MethodCallSite site)static TypeInferenceLoggernoop()default voidpolyResolutionFailure(JavaNode node)default voidpropagateAndAbort(net.sourceforge.pmd.lang.java.types.internal.infer.InferenceContext context, net.sourceforge.pmd.lang.java.types.internal.infer.InferenceContext parent)default voidskipArgAsNonPertinent(int i, ExprMirror expr)default voidskipInstantiation(JMethodSig partiallyInferred, MethodCallSite site)default voidstartArg(int i, ExprMirror expr, JTypeMirror formal)default voidstartArgsChecks()default voidstartInference(JMethodSig sig, MethodCallSite site, net.sourceforge.pmd.lang.java.types.internal.infer.MethodResolutionPhase phase)default voidstartReturnChecks()
-
-
-
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 phaseare 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()
-
-