Annotation Interface Produces
Declares a typed managed factory method. The factory receiver and parameters are graph
dependencies. Owned returned AutoCloseable values are closed once by their owning scope;
borrowed values remain the caller's responsibility. Lifecycle hooks are a separate hosting API.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumProduct ownership, independent of the factory receiver's ownership. -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionReturns an exact optional product name; Named's existing targets remain unchanged.Returns who disposes the produced value.
-
Element Details
-
name
String nameReturns an exact optional product name; Named's existing targets remain unchanged.- Returns:
- the empty string for an unnamed product
- Default:
""
-
ownership
Produces.Ownership ownershipReturns who disposes the produced value.- Returns:
- managed ownership by default
- Default:
OWNED
-