Package io.quarkus.arc
Interface InjectableBean<T>
-
- Type Parameters:
T
-
- All Superinterfaces:
javax.enterprise.inject.spi.Bean<T>
,javax.enterprise.inject.spi.BeanAttributes<T>
,javax.enterprise.context.spi.Contextual<T>
,InjectableReferenceProvider<T>
- All Known Subinterfaces:
InjectableDecorator<T>
,InjectableInterceptor<T>
- All Known Implementing Classes:
BeanManagerBean
,BuiltInBean
,EventBean
,InitializedInterceptor
,InstanceBean
public interface InjectableBean<T> extends javax.enterprise.inject.spi.Bean<T>, InjectableReferenceProvider<T>
Quarkus representation of an injectable bean. This interface extends the standard CDIBean
interface.- Author:
- Martin Kouba
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
InjectableBean.Kind
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default void
destroy(T instance, javax.enterprise.context.spi.CreationalContext<T> creationalContext)
default Integer
getAlternativePriority()
default InjectableBean<?>
getDeclaringBean()
String
getIdentifier()
The identifier is generated by the container and is unique for a specific deployment.default Set<javax.enterprise.inject.spi.InjectionPoint>
getInjectionPoints()
default InjectableBean.Kind
getKind()
default String
getName()
default int
getPriority()
A bean may have a priority assigned.default Set<Annotation>
getQualifiers()
default Class<? extends Annotation>
getScope()
default Set<Class<? extends Annotation>>
getStereotypes()
Set<Type>
getTypes()
default boolean
isAlternative()
default boolean
isDefaultBean()
default boolean
isNullable()
Deprecated.default boolean
isSuppressed()
Suppressed beans cannot be obtained by programmatic lookup viaInstance
.-
Methods inherited from interface io.quarkus.arc.InjectableReferenceProvider
get
-
-
-
-
Method Detail
-
getIdentifier
String getIdentifier()
The identifier is generated by the container and is unique for a specific deployment.- Returns:
- the identifier for this bean
-
getKind
default InjectableBean.Kind getKind()
- Returns:
- the kind of the bean
- See Also:
InjectableBean.Kind
-
getScope
default Class<? extends Annotation> getScope()
- Specified by:
getScope
in interfacejavax.enterprise.inject.spi.BeanAttributes<T>
- Returns:
- the scope
-
getTypes
Set<Type> getTypes()
- Specified by:
getTypes
in interfacejavax.enterprise.inject.spi.BeanAttributes<T>
- Returns:
- the set of bean types
-
getQualifiers
default Set<Annotation> getQualifiers()
- Specified by:
getQualifiers
in interfacejavax.enterprise.inject.spi.BeanAttributes<T>
- Returns:
- the set of qualifiers
-
destroy
default void destroy(T instance, javax.enterprise.context.spi.CreationalContext<T> creationalContext)
- Specified by:
destroy
in interfacejavax.enterprise.context.spi.Contextual<T>
-
getDeclaringBean
default InjectableBean<?> getDeclaringBean()
- Returns:
- the declaring bean if the bean is a producer method/field, or
null
-
getName
default String getName()
- Specified by:
getName
in interfacejavax.enterprise.inject.spi.BeanAttributes<T>
-
getStereotypes
default Set<Class<? extends Annotation>> getStereotypes()
- Specified by:
getStereotypes
in interfacejavax.enterprise.inject.spi.BeanAttributes<T>
-
getInjectionPoints
default Set<javax.enterprise.inject.spi.InjectionPoint> getInjectionPoints()
- Specified by:
getInjectionPoints
in interfacejavax.enterprise.inject.spi.Bean<T>
-
isNullable
@Deprecated default boolean isNullable()
Deprecated.- Specified by:
isNullable
in interfacejavax.enterprise.inject.spi.Bean<T>
-
isAlternative
default boolean isAlternative()
- Specified by:
isAlternative
in interfacejavax.enterprise.inject.spi.BeanAttributes<T>
-
getAlternativePriority
default Integer getAlternativePriority()
- Returns:
- the priority if the bean is an alternative, or
null
-
isDefaultBean
default boolean isDefaultBean()
- Returns:
- whether or not the bean is a default bean
-
isSuppressed
default boolean isSuppressed()
Suppressed beans cannot be obtained by programmatic lookup viaInstance
.- Returns:
true
if the bean should be suppressed
-
getPriority
default int getPriority()
A bean may have a priority assigned.Class-based beans can specify the priority declaratively via
Priority
andPriority
. If no priority annotation is used then a bean has the priority of value 0.This priority is used to sort the resolved beans when performing programmatic lookup via
Instance
or when injecting a list of beans by means of theAll
qualifier.- Returns:
- the priority
- See Also:
Priority
-
-