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 classImplementation of @Namedthat 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 @Qualifierannotation associated with this particular bean.javax.inject.Provider<T> Returns the underlyingProvider; may support creation of multiple instances.intgetRank()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:BeanEntryReturns the @Qualifierannotation associated with this particular bean.- Specified by:
getKeyin interfaceBeanEntry<Q extends Annotation,T> - Specified by:
getKeyin interfaceMap.Entry<Q extends Annotation,T> - Returns:
- Qualifier annotation
-
getValue
Description copied from interface:BeanEntryReturns the associated instance of the bean; returns same instance for each call.- Specified by:
getValuein interfaceBeanEntry<Q extends Annotation,T> - Specified by:
getValuein interfaceMap.Entry<Q extends Annotation,T> - Returns:
- Bean instance (lazily-created)
-
setValue
- Specified by:
setValuein interfaceMap.Entry<Q extends Annotation,T>
-
getProvider
Description copied from interface:BeanEntryReturns the underlyingProvider; may support creation of multiple instances.- Specified by:
getProviderin interfaceBeanEntry<Q extends Annotation,T> - Returns:
- Bean provider
-
getDescription
Description copied from interface:BeanEntryReturns a human-readable description of the bean; see @Description.- Specified by:
getDescriptionin interfaceBeanEntry<Q extends Annotation,T> - Returns:
- Human-readable description
- See Also:
-
getImplementationClass
Description copied from interface:BeanEntryAttempts to find the implementation type without creating the bean instance.- Specified by:
getImplementationClassin interfaceBeanEntry<Q extends Annotation,T> - Returns:
- Implementation type;
nullif the type cannot be determined
-
getSource
Description copied from interface:BeanEntryReturns an arbitrary object that indicates where this bean was configured.- Specified by:
getSourcein interfaceBeanEntry<Q extends Annotation,T> - Returns:
- Source location
-
getRank
public int getRank()Description copied from interface:BeanEntryReturns the bean's rank; higher ranked beans override lower ranked beans.- Specified by:
getRankin interfaceBeanEntry<Q extends Annotation,T> - Returns:
- Assigned rank
- See Also:
-
toString
-