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 TypeMethodDescriptioncreate(ManagedResolver resolver) Creates the product with direct generated access.Returns every constructor, injected-field and factory-receiver dependency.default voidinject(T instance, ManagedResolver resolver) Injects declared fields after construction, before publishing the instance.name()Returns the exact optional product name.default booleanowned()Specifies whether the owning managed scope closes an AutoCloseable product.Returns exact custom qualifiers, including default members.scope()Returns the declared lifetime.type()Returns the exposed product contract.
-
Method Details
-
type
-
name
-
qualifiers
List<ManagedQualifier> qualifiers()Returns exact custom qualifiers, including default members.- Returns:
- immutable qualifiers
-
scope
-
dependencies
List<ManagedDependency> dependencies()Returns every constructor, injected-field and factory-receiver dependency.- Returns:
- finite immutable dependency list, including lazy edges
-
create
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
Injects declared fields after construction, before publishing the instance.- Parameters:
instance- newly created productresolver- 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
-