Interface ReferencesSelector
- All Known Subinterfaces:
Creation<I>
,Destruction
,References<R>
public interface ReferencesSelector
A supplier of
References
objects.- Author:
- Laird Nelson
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Destroys the supplied contextual reference if and only if it meets the conditions for destruction.default <R> R
A convenience method that acquires and returns what is presumed, possibly incorrectly, to be the sole contextual reference of the relevant type.<R> References
<R> Returns aReferences
capable of locating contextual references of the relevant type.
-
Method Details
-
destroy
Destroys the supplied contextual reference if and only if it meets the conditions for destruction.- Parameters:
r
- a contextual reference; may benull
in which casefalse
will be returned- Returns:
true
if and only if destruction occurred- Throws:
DestructionException
- if an error occurs
-
references
Returns aReferences
capable of locating contextual references of the relevant type.- Type Parameters:
R
- the contextual reference type- Parameters:
t
- anAttributedType
describing the contextual reference type; must not benull
- Returns:
- a non-
null
References
- Throws:
NullPointerException
- ift
isnull
- See Also:
-
reference
A convenience method that acquires and returns what is presumed, possibly incorrectly, to be the sole contextual reference of the relevant type.- Type Parameters:
R
- the contextual reference type- Parameters:
t
- anAttributedType
describing the contextual reference type; must not benull
- Returns:
- a non-
null
contextual reference - Throws:
NullPointerException
- ift
isnull
UnsatisfiedReductionException
- if there is no contextual reference for the relevant typeAmbiguousReductionException
- if there is more than one contextual reference for the relevant type- See Also:
-