Interface ManagedComponentDefinition<T>

Type Parameters:
T - declared product contract type
All Known Subinterfaces:
ManagedHostAdapter<T>, ManagedHostedAdapter<T>, ManagedJobDefinition<T>, ManagedPartitionDefinition<T>

public interface ManagedComponentDefinition<T>
Generated direct-access construction plan; component metadata must remain immutable. Runtime validation precedes creation. Implementations call only public/package-accessible members from their own generated package and do not require global JPMS opens.
  • Method Summary

    Modifier and Type
    Method
    Description
    Creates the product with direct generated access.
    Returns every constructor, injected-field and factory-receiver dependency.
    default void
    inject(T instance, ManagedResolver resolver)
    Injects declared fields after construction, before publishing the instance.
    Returns the exact optional product name.
    default boolean
    Specifies whether the owning managed scope closes an AutoCloseable product.
    Returns exact custom qualifiers, including default members.
    Returns the declared lifetime.
    Returns the exposed product contract.
  • Method Details

    • type

      Class<T> type()
      Returns the exposed product contract.
      Returns:
      nonnull erased contract
    • name

      String name()
      Returns the exact optional product name.
      Returns:
      nonnull name, empty for unnamed
    • qualifiers

      List<ManagedQualifier> qualifiers()
      Returns exact custom qualifiers, including default members.
      Returns:
      immutable qualifiers
    • scope

      Scope.Kind scope()
      Returns the declared lifetime.
      Returns:
      activation, call or prototype
    • dependencies

      List<ManagedDependency> dependencies()
      Returns every constructor, injected-field and factory-receiver dependency.
      Returns:
      finite immutable dependency list, including lazy edges
    • create

      T create(ManagedResolver resolver) throws Exception
      Creates the product with direct generated access.
      Parameters:
      resolver - resolver restricted to this definition's declared edges
      Returns:
      nonnull product assignable to type()
      Throws:
      Exception - if application construction/factory code fails
    • inject

      default void inject(T instance, ManagedResolver resolver) throws Exception
      Injects declared fields after construction, before publishing the instance.
      Parameters:
      instance - newly created product
      resolver - resolver restricted to declared edges
      Throws:
      Exception - if field injection fails
    • owned

      default boolean owned()
      Specifies whether the owning managed scope closes an AutoCloseable product. Factory receivers retain their own independent ownership. Borrowed products are never closed by the container; caller ownership must outlive every borrowing scope.
      Returns:
      true for owned products by default