Package org.eclipse.sisu.inject
Class LazyBeanEntry<Q extends Annotation,T>
java.lang.Object
org.eclipse.sisu.inject.LazyBeanEntry<Q,T>
Lazy
BeanEntry
backed by a qualified Binding
and an assigned rank.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final class
Implementation of @Named
that can also act like @Named
. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a human-readable description of the bean; see @Description
.Attempts to find the implementation type without creating the bean instance.getKey()
Returns the @Qualifier
annotation associated with this particular bean.javax.inject.Provider<T>
Returns the underlyingProvider
; may support creation of multiple instances.int
getRank()
Returns the bean's rank; higher ranked beans override lower ranked beans.Returns an arbitrary object that indicates where this bean was configured.getValue()
Returns the associated instance of the bean; returns same instance for each call.toString()
-
Field Details
-
qualifier
-
binding
-
lazyValue
-
rank
private final int rank
-
-
Constructor Details
-
LazyBeanEntry
-
-
Method Details
-
getKey
Description copied from interface:BeanEntry
Returns the @Qualifier
annotation associated with this particular bean.- Specified by:
getKey
in interfaceBeanEntry<Q extends Annotation,
T> - Specified by:
getKey
in interfaceMap.Entry<Q extends Annotation,
T> - Returns:
- Qualifier annotation
-
getValue
Description copied from interface:BeanEntry
Returns the associated instance of the bean; returns same instance for each call.- Specified by:
getValue
in interfaceBeanEntry<Q extends Annotation,
T> - Specified by:
getValue
in interfaceMap.Entry<Q extends Annotation,
T> - Returns:
- Bean instance (lazily-created)
-
setValue
- Specified by:
setValue
in interfaceMap.Entry<Q extends Annotation,
T>
-
getProvider
Description copied from interface:BeanEntry
Returns the underlyingProvider
; may support creation of multiple instances.- Specified by:
getProvider
in interfaceBeanEntry<Q extends Annotation,
T> - Returns:
- Bean provider
-
getDescription
Description copied from interface:BeanEntry
Returns a human-readable description of the bean; see @Description
.- Specified by:
getDescription
in interfaceBeanEntry<Q extends Annotation,
T> - Returns:
- Human-readable description
- See Also:
-
getImplementationClass
Description copied from interface:BeanEntry
Attempts to find the implementation type without creating the bean instance.- Specified by:
getImplementationClass
in interfaceBeanEntry<Q extends Annotation,
T> - Returns:
- Implementation type;
null
if the type cannot be determined
-
getSource
Description copied from interface:BeanEntry
Returns an arbitrary object that indicates where this bean was configured.- Specified by:
getSource
in interfaceBeanEntry<Q extends Annotation,
T> - Returns:
- Source location
-
getRank
public int getRank()Description copied from interface:BeanEntry
Returns the bean's rank; higher ranked beans override lower ranked beans. -
toString
-