Class ScopedInstances
java.lang.Object
org.microbean.scopelet.ScopedInstances
- All Implemented Interfaces:
Instances
An
Instances implementation that is based on scopes.- Author:
- Laird Nelson
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionScopedInstances(Domain domain, Qualifiers qualifiers, Scopes scopes) Creates a newScopedInstances. -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanprimordial(Collection<? extends Attributes> c) Returnstrueif and only if the suppliedCollectionofAttributesis deemed to designate something as primordial.booleanReturnstrueif and only if the suppliedIdis proxiable.static final Selectable<AttributedType, Bean<?>> selectableOf(Domain domain, Selectable<AttributedType, Bean<?>> selectable) Returns aSelectable<AttributedType, Bean<?>>that properly considers the fact that aScopeletmay be active or inactive at any point for any reason.final <I> Supplier<? extends I>
-
Constructor Details
-
ScopedInstances
Creates a newScopedInstances.- Parameters:
domain- aDomain; must not benullqualifiers- aQualifiers; must not benullscopes- aScopes; must not benull- Throws:
NullPointerException- if any argument isnull
-
-
Method Details
-
proxiable
-
supplier
-
primordial
Returnstrueif and only if the suppliedCollectionofAttributesis deemed to designate something as primordial.The default implementation of this method returns
trueif and only if the suppliedCollectioncontains the primordial qualifier.- Parameters:
c- aCollection; must not benull- Returns:
trueif and only if the suppliedCollectionofAttributesis deemed to designate something as primordial- Throws:
NullPointerException- ifcisnull- See Also:
-
selectableOf
public static final Selectable<AttributedType, Bean<?>> selectableOf(Domain domain, Selectable<AttributedType, Bean<?>> selectable) Returns aSelectable<AttributedType, Bean<?>>that properly considers the fact that aScopeletmay be active or inactive at any point for any reason.- Parameters:
domain- aDomain; must not benullselectable- aSelectablethat will be used for allAttributedTypes other thanScopelettypes being sought for the purpose of instantiating or acquiring contextual instances; must not benull- Returns:
- a non-
nullSelectable - Throws:
NullPointerException- if any argument isnull
-