java.lang.Object
org.microbean.bean.InterceptingProducer<I>
-
Field Summary
Fields inherited from interface org.microbean.bean.Aggregate
EMPTY_ASSIGNMENTS, EMPTY_DEPENDENCIES
-
Constructor Summary
ConstructorDescriptionInterceptingProducer
(Collection<? extends org.microbean.interceptor.InterceptorMethod> interceptorMethods, Producer<I> producer) -
Method Summary
Modifier and TypeMethodDescriptionfinal SequencedSet
<? extends Assignment<?>> Assigns a contextual reference to each of thisAggregate
'sAttributedElement
instances and returns the resultingList
ofAssignment
s.final SequencedSet
<AttributedElement> Returns an unmodifiableSequencedSet
ofAttributedElement
instances.final void
final I
produce
(SequencedSet<? extends Assignment<?>> assignments) Produces a new contextual instance and returns it, possibly (often) making use of the supplied, dependent, contextual references.final I
-
Constructor Details
-
InterceptingProducer
public InterceptingProducer(Collection<? extends org.microbean.interceptor.InterceptorMethod> interceptorMethods, Producer<I> producer)
-
-
Method Details
-
assign
Description copied from interface:Aggregate
Assigns a contextual reference to each of thisAggregate
'sAttributedElement
instances and returns the resultingList
ofAssignment
s.- Specified by:
assign
in interfaceAggregate
- Parameters:
r
- aRequest
; must not benull
- Returns:
- a
List
ofAssignment
instances; nevernull
-
dependencies
Description copied from interface:Aggregate
Returns an unmodifiableSequencedSet
ofAttributedElement
instances.- Specified by:
dependencies
in interfaceAggregate
- Returns:
- an unmodifiable
SequencedSet
ofAttributedElement
instances; nevernull
- See Also:
-
dispose
-
produce
-
produce
Description copied from interface:Producer
Produces a new contextual instance and returns it, possibly (often) making use of the supplied, dependent, contextual references.Implementations of this method must not call
Producer.produce(Request)
or an infinite loop may result.- Specified by:
produce
in interfaceProducer<I>
- Parameters:
assignments
- aSequencedSet
ofAssignment
s thisProducer
needs to create the contextual instance; must not benull
- Returns:
- a new contextual instance, or
null
-