Interface J7mInjector


public interface J7mInjector
J7M-native application component injector.

The injector creates application-owned components from public annotations and public capability bindings. It is intentionally much smaller than a general-purpose dependency injection framework: it supports constructor injection, controlled field injection, safe configuration values, invocation-scoped context values, lifecycle hooks, and diagnostics. It does not require Spring, Guice, CDI, bytecode generation, classpath scanning, or vendor-specific APIs.

Implementations must be thread-safe for concurrent component creation once configured. Blocking behavior is limited to reflective construction and lifecycle method invocation; implementations must not perform network I/O as part of dependency resolution. Missing or ambiguous dependencies must fail with stable middleware error codes and redacted diagnostics.

  • Method Summary

    Modifier and Type
    Method
    Description
    <T> T
    instantiate(Class<T> type)
    Creates an application-owned component.
    void
    invokeLifecycle(Object component, Class<? extends Annotation> annotation)
    Invokes all no-argument lifecycle methods annotated with the supplied annotation.
    Returns a safe immutable status snapshot.
  • Method Details

    • instantiate

      <T> T instantiate(Class<T> type)
      Creates an application-owned component.
      Type Parameters:
      T - component type
      Parameters:
      type - component class
      Returns:
      constructed and field-injected component
    • invokeLifecycle

      void invokeLifecycle(Object component, Class<? extends Annotation> annotation)
      Invokes all no-argument lifecycle methods annotated with the supplied annotation.
      Parameters:
      component - component instance
      annotation - lifecycle annotation type
    • status

      Returns a safe immutable status snapshot.
      Returns:
      injection graph status