Class WiringReportCompiler

java.lang.Object
build.codemodel.dependency.injection.WiringReportCompiler
All Implemented Interfaces:
build.codemodel.framework.compiler.Compiler<build.codemodel.jdk.JDKCodeModel>, build.codemodel.framework.Plugin, build.codemodel.framework.Targetable<build.codemodel.jdk.JDKCodeModel>

public final class WiringReportCompiler extends Object implements build.codemodel.framework.compiler.Compiler<build.codemodel.jdk.JDKCodeModel>
A Compiler that reads the BindingGraphTrait from the JDKCodeModel and emits a human-readable wiring report. When the trait is absent (i.e. Context.snapshot(Path) was never called) this compiler is a no-op.

The report groups bindings by scope, lists their direct dependencies and dependents, and flags scope violations. It is written to the Path supplied at construction time.

For projects that do not use the codemodel-framework annotation-processor pipeline, the equivalent output is produced directly by Context.snapshot(Path).

Since:
Apr-2026
Author:
reed.vonredwitz
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs a WiringReportCompiler that writes its output to outputPath.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    compile(build.codemodel.jdk.JDKCodeModel target, build.codemodel.foundation.CodeModel codeModel, build.base.telemetry.TelemetryRecorder telemetryRecorder)
     

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface build.codemodel.framework.compiler.Compiler

    getTargetClass

    Methods inherited from interface build.codemodel.framework.Targetable

    getTargetClass
  • Constructor Details

    • WiringReportCompiler

      public WiringReportCompiler(Path outputPath)
      Constructs a WiringReportCompiler that writes its output to outputPath.
      Parameters:
      outputPath - the path to write the report to; must not be null
  • Method Details

    • compile

      public void compile(build.codemodel.jdk.JDKCodeModel target, build.codemodel.foundation.CodeModel codeModel, build.base.telemetry.TelemetryRecorder telemetryRecorder)
      Specified by:
      compile in interface build.codemodel.framework.compiler.Compiler<build.codemodel.jdk.JDKCodeModel>