Package net.hydromatic.morel.compile
Class Tracers
java.lang.Object
net.hydromatic.morel.compile.Tracers
Utilities for
Tracer.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classTracer that delegates to an underlying tracer.private static classTracer that does nothing. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Tracerempty()Returns a tracer that does nothing.static TracerwithOnCompileException(Tracer tracer, Consumer<CompileException> consumer) static TracerwithOnCore(Tracer tracer, int pass, Consumer<Core.Decl> consumer) Returns a tracer that performs the given action on a declaration, then calls the underlying tracer.static TracerwithOnException(Tracer tracer, Consumer<@Nullable Throwable> consumer) static TracerwithOnPlan(Tracer tracer, Consumer<Code> consumer) Returns a tracer that performs the given action on code, then calls the underlying tracer.static TracerwithOnResult(Tracer tracer, Consumer<Object> consumer) Returns a tracer that performs the given action on the result of an evaluation, then calls the underlying tracer.static TracerwithOnTypeException(Tracer tracer, Consumer<TypeResolver.TypeException> consumer) static TracerwithOnWarnings(Tracer tracer, Consumer<List<Throwable>> consumer)
-
Constructor Details
-
Tracers
public Tracers()
-
-
Method Details
-
empty
Returns a tracer that does nothing. -
withOnCore
Returns a tracer that performs the given action on a declaration, then calls the underlying tracer. -
withOnPlan
Returns a tracer that performs the given action on code, then calls the underlying tracer. -
withOnResult
Returns a tracer that performs the given action on the result of an evaluation, then calls the underlying tracer. -
withOnWarnings
-
withOnException
-
withOnCompileException
-
withOnTypeException
public static Tracer withOnTypeException(Tracer tracer, Consumer<TypeResolver.TypeException> consumer)
-