Package net.hydromatic.morel.compile
Class Tracers
- java.lang.Object
-
- net.hydromatic.morel.compile.Tracers
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classTracers.DelegatingTracerTracer that delegates to an underlying tracer.private static classTracers.EmptyTracerTracer that does nothing.
-
Constructor Summary
Constructors Constructor Description Tracers()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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)
-
-
-
Method Detail
-
empty
public static Tracer empty()
Returns a tracer that does nothing.
-
withOnCore
public static Tracer withOnCore(Tracer tracer, int pass, Consumer<Core.Decl> consumer)
Returns a tracer that performs the given action on a declaration, then calls the underlying tracer.
-
withOnPlan
public static Tracer withOnPlan(Tracer tracer, Consumer<Code> consumer)
Returns a tracer that performs the given action on code, then calls the underlying tracer.
-
withOnResult
public static Tracer withOnResult(Tracer tracer, Consumer<Object> consumer)
Returns a tracer that performs the given action on the result of an evaluation, then calls the underlying tracer.
-
withOnWarnings
public static Tracer withOnWarnings(Tracer tracer, Consumer<List<Throwable>> consumer)
-
withOnException
public static Tracer withOnException(Tracer tracer, Consumer<@Nullable Throwable> consumer)
-
withOnCompileException
public static Tracer withOnCompileException(Tracer tracer, Consumer<CompileException> consumer)
-
withOnTypeException
public static Tracer withOnTypeException(Tracer tracer, Consumer<TypeResolver.TypeException> consumer)
-
-