Interface Request<I>
- Type Parameters:
I- the type of the contextual reference
- All Superinterfaces:
Creation<I>
A request for a contextual reference of a particular attributed type, along with functionality to help fulfil the
request.
- Author:
- Laird Nelson
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturns theBeanReductiondescribing thisRequestin progress.<J> Request<J> child(BeanReduction<J> beanReduction) Returns aRequestthat is conceptually a child of thisRequestand that represents a request for a contextual reference satisfying the suppliedBeanReduction.default <R> Rreference(AttributedType attributedType) Acquires a contextual reference that matches the suppliedAttributedTypeand returns it.<R> Rreference(AttributedType attributedType, Bean<R> bean, Creation<R> creation) Returns a contextual reference that matches the suppliedAttributedType, using the suppliedBeanto disambiguate otherwise ambiguous contextual reference selections.default <R> Rreference(AttributedType attributedType, Creation<R> creation) Returns a contextual reference that matches the suppliedAttributedType.
-
Method Details
-
beanReduction
Returns theBeanReductiondescribing thisRequestin progress.- Returns:
- the
BeanReductiondescribing thisRequestin progress; nevernull - See Also:
- Idempotency:
- Implementations of this method must be idempotent and deterministic.
- Nullability:
- Implementations of this method must not return
null. - Thread Safety:
- Implementations of this method must be safe for concurrent use by multiple threads.
-
child
Returns aRequestthat is conceptually a child of thisRequestand that represents a request for a contextual reference satisfying the suppliedBeanReduction.If the supplied
BeanReductionis equal to the return value of an invocation of thisRequest'sbeanReduction()method, it is permissible for thisRequestto be returned instead of a new child.- Type Parameters:
J- the type of contextual reference returned by the childRequest- Parameters:
beanReduction- aBeanReduction; must not benull- Returns:
- a
Requestthat is conceptually a child of thisRequestand that represents a request for a contextual reference satisfying the suppliedBeanReduction; nevernull - Throws:
NullPointerException- ifbeanReductionisnull
-
reference
Acquires a contextual reference that matches the suppliedAttributedTypeand returns it.- Type Parameters:
R- the type of contextual reference- Parameters:
attributedType- anAttributedType; must not benull- Returns:
- a contextual reference, which may be
null - Throws:
NullPointerException- ifattributedtypeisnull
-
reference
Returns a contextual reference that matches the suppliedAttributedType, using the suppliedBeanto disambiguate otherwise ambiguous contextual reference selections.- Type Parameters:
R- the type of contextual reference- Parameters:
attributedType- anAttributedType; must not benullbean- aBeanthat can be used to disambiguate otherwise ambiguous contextual reference selections; may (commonly) benullif the caller expects there to be no ambiguitycreation- aCreation; must not benull- Returns:
- a contextual reference; never
null - Throws:
NullPointerException- ifattributedTypeorcreationisnull
-
reference
Returns a contextual reference that matches the suppliedAttributedType.- Type Parameters:
R- the type of contextual reference- Parameters:
attributedType- anAttributedType; must not benullcreation- aCreation; must not benull- Returns:
- a contextual reference; never
null - Throws:
NullPointerException- ifattributedTypeorcreationisnull
-