Package io.quarkus.arc
Interface ResourceReferenceProvider
-
public interface ResourceReferenceProviderMakes it possible to resolve non-CDI injection points, such as Java EE resources.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description InstanceHandle<Object>get(Type type, Set<Annotation> annotations)A resource reference handle is a dependent object of the object it is injected into.default <T extends Annotation>
TgetAnnotation(Set<Annotation> annotations, Class<T> annotationType)Convenient util method.
-
-
-
Method Detail
-
get
InstanceHandle<Object> get(Type type, Set<Annotation> annotations)
A resource reference handle is a dependent object of the object it is injected into.InstanceHandle.destroy()is called when the target object is destroyed.class ResourceBean { @Resource(lookup = "bar") String bar; @Produces @PersistenceContext EntityManager entityManager; }- Parameters:
type-annotations-- Returns:
- the resource reference handle or
nullif not resolvable
-
getAnnotation
default <T extends Annotation> T getAnnotation(Set<Annotation> annotations, Class<T> annotationType)
Convenient util method.- Parameters:
annotations-annotationType-- Returns:
-
-