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 . |
Modifier and Type | Method and Description |
---|---|
T |
create(javax.enterprise.context.spi.CreationalContext<T> creationalContext) |
protected abstract T |
create(javax.enterprise.context.spi.CreationalContext<T> creationalContext,
Class<T> repositoryType)
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() |
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 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>
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
protected abstract T create(javax.enterprise.context.spi.CreationalContext<T> creationalContext, Class<T> repositoryType)
creationalContext
- will never be null.repositoryType
- will never be null.Copyright © 2011-2014-2014 Pivotal. All Rights Reserved.