public abstract class CdiRepositoryBean<T> extends Object implements javax.enterprise.inject.spi.Bean<T>, javax.enterprise.inject.spi.PassivationCapable
Bean wrappers.| Constructor and Description |
|---|
CdiRepositoryBean(Set<Annotation> qualifiers,
Class<T> repositoryType,
javax.enterprise.inject.spi.BeanManager beanManager)
Creates a new
CdiRepositoryBean. |
CdiRepositoryBean(Set<Annotation> qualifiers,
Class<T> repositoryType,
javax.enterprise.inject.spi.BeanManager beanManager,
CustomRepositoryImplementationDetector detector)
Creates a new
CdiRepositoryBean. |
| Modifier and Type | Method and Description |
|---|---|
T |
create(javax.enterprise.context.spi.CreationalContext<T> creationalContext) |
protected T |
create(javax.enterprise.context.spi.CreationalContext<T> creationalContext,
Class<T> repositoryType)
Deprecated.
overide
create(CreationalContext, Class, Object) instead. |
protected T |
create(javax.enterprise.context.spi.CreationalContext<T> creationalContext,
Class<T> repositoryType,
Object customImplementation)
Creates the actual component instance.
|
void |
destroy(T instance,
javax.enterprise.context.spi.CreationalContext<T> creationalContext) |
Class<?> |
getBeanClass() |
protected <S> S |
getDependencyInstance(javax.enterprise.inject.spi.Bean<S> bean,
Class<S> type)
Returns an instance of an the given
Bean. |
String |
getId() |
Set<javax.enterprise.inject.spi.InjectionPoint> |
getInjectionPoints() |
String |
getName() |
Set<Annotation> |
getQualifiers() |
Class<? extends Annotation> |
getScope() |
Set<Class<? extends Annotation>> |
getStereotypes() |
Set<Type> |
getTypes() |
void |
initialize()
Forces the initialization of bean target.
|
boolean |
isAlternative() |
boolean |
isNullable() |
protected CdiRepositoryConfiguration |
lookupConfiguration(javax.enterprise.inject.spi.BeanManager beanManager,
Set<Annotation> qualifiers)
Looks up an instance of a
CdiRepositoryConfiguration. |
String |
toString() |
public CdiRepositoryBean(Set<Annotation> qualifiers, Class<T> repositoryType, javax.enterprise.inject.spi.BeanManager beanManager)
CdiRepositoryBean.qualifiers - must not be null.repositoryType - has to be an interface must not be null.beanManager - the CDI BeanManager, must not be null.public CdiRepositoryBean(Set<Annotation> qualifiers, Class<T> repositoryType, javax.enterprise.inject.spi.BeanManager beanManager, CustomRepositoryImplementationDetector detector)
CdiRepositoryBean.qualifiers - must not be null.repositoryType - has to be an interface must not be null.beanManager - the CDI BeanManager, must not be null.detector - detector for the custom repository implementations CustomRepositoryImplementationDetector,
can be null.public Set<Type> getTypes()
getTypes in interface javax.enterprise.inject.spi.Bean<T>protected <S> S getDependencyInstance(javax.enterprise.inject.spi.Bean<S> bean,
Class<S> type)
Bean.bean - the Bean about to create an instance for.type - the expected type of the componentn instance created for that Bean.public final void initialize()
public final T create(javax.enterprise.context.spi.CreationalContext<T> creationalContext)
create in interface javax.enterprise.context.spi.Contextual<T>public void destroy(T instance, javax.enterprise.context.spi.CreationalContext<T> creationalContext)
destroy in interface javax.enterprise.context.spi.Contextual<T>protected CdiRepositoryConfiguration lookupConfiguration(javax.enterprise.inject.spi.BeanManager beanManager, Set<Annotation> qualifiers)
CdiRepositoryConfiguration. In case the instance cannot be found within the CDI
scope, a default configuration is used.public Set<Annotation> getQualifiers()
getQualifiers in interface javax.enterprise.inject.spi.Bean<T>public String getName()
getName in interface javax.enterprise.inject.spi.Bean<T>public Set<Class<? extends Annotation>> getStereotypes()
getStereotypes in interface javax.enterprise.inject.spi.Bean<T>public Class<?> getBeanClass()
getBeanClass in interface javax.enterprise.inject.spi.Bean<T>public boolean isAlternative()
isAlternative in interface javax.enterprise.inject.spi.Bean<T>public boolean isNullable()
isNullable in interface javax.enterprise.inject.spi.Bean<T>public Set<javax.enterprise.inject.spi.InjectionPoint> getInjectionPoints()
getInjectionPoints in interface javax.enterprise.inject.spi.Bean<T>public Class<? extends Annotation> getScope()
getScope in interface javax.enterprise.inject.spi.Bean<T>public String getId()
getId in interface javax.enterprise.inject.spi.PassivationCapable@Deprecated protected T create(javax.enterprise.context.spi.CreationalContext<T> creationalContext, Class<T> repositoryType)
create(CreationalContext, Class, Object) instead.creationalContext - will never be null.repositoryType - will never be null.protected T create(javax.enterprise.context.spi.CreationalContext<T> creationalContext, Class<T> repositoryType, Object customImplementation)
creationalContext - will never be null.repositoryType - will never be null.customImplementation - can be null.Copyright © 2011–2018 Pivotal Software, Inc.. All rights reserved.