public class WrappingJerseyInjectionTarget<T> extends Object
InjectionTarget
that just wraps the provided InjectionTarget
because of additional
features in an injection phase.Constructor and Description |
---|
WrappingJerseyInjectionTarget(javax.enterprise.inject.spi.Bean<T> bean,
Collection<org.glassfish.jersey.internal.inject.InjectionResolver> resolvers)
Creates a new jersey injection target with delegate as a
NoOpInjectionTarget that creates no operation that
means that only jersey injection is available as a additional feature. |
WrappingJerseyInjectionTarget(javax.enterprise.inject.spi.InjectionTarget<T> delegate,
javax.enterprise.inject.spi.Bean<T> bean,
Collection<org.glassfish.jersey.internal.inject.InjectionResolver> resolvers)
An implementation of
InjectionTarget for classes that do not fulfill bean class requirements
(e.g. |
Modifier and Type | Method and Description |
---|---|
void |
dispose(T instance) |
Set<javax.enterprise.inject.spi.InjectionPoint> |
getInjectionPoints() |
void |
inject(T instance,
javax.enterprise.context.spi.CreationalContext<T> ctx) |
void |
postConstruct(T instance) |
void |
preDestroy(T instance) |
T |
produce(javax.enterprise.context.spi.CreationalContext<T> ctx) |
public WrappingJerseyInjectionTarget(javax.enterprise.inject.spi.Bean<T> bean, Collection<org.glassfish.jersey.internal.inject.InjectionResolver> resolvers)
NoOpInjectionTarget
that creates no operation that
means that only jersey injection is available as a additional feature.bean
- bean as descriptor of the class which will be injected.resolvers
- all resolvers that can provide a valued for Jersey-specific injection.public WrappingJerseyInjectionTarget(javax.enterprise.inject.spi.InjectionTarget<T> delegate, javax.enterprise.inject.spi.Bean<T> bean, Collection<org.glassfish.jersey.internal.inject.InjectionResolver> resolvers)
InjectionTarget
for classes that do not fulfill bean class requirements
(e.g. are abstract or non-static inner classes). Instances of these class can be injected using this implementation. If the
application attempts to produce(CreationalContext)
a new instance of the class, CreationException
is
thrown.delegate
- CDI specific injection target.bean
- bean as descriptor of the class which will be injected.resolvers
- all resolvers that can provide a valued for Jersey-specific injection.public void inject(T instance, javax.enterprise.context.spi.CreationalContext<T> ctx)
inject
in interface javax.enterprise.inject.spi.InjectionTarget<T>
public void postConstruct(T instance)
postConstruct
in interface javax.enterprise.inject.spi.InjectionTarget<T>
public void preDestroy(T instance)
preDestroy
in interface javax.enterprise.inject.spi.InjectionTarget<T>
public T produce(javax.enterprise.context.spi.CreationalContext<T> ctx)
produce
in interface javax.enterprise.inject.spi.Producer<T>
public void dispose(T instance)
dispose
in interface javax.enterprise.inject.spi.Producer<T>
public Set<javax.enterprise.inject.spi.InjectionPoint> getInjectionPoints()
getInjectionPoints
in interface javax.enterprise.inject.spi.Producer<T>
Copyright © 2007-2017, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.