Package org.jboss.resteasy.cdi
Class Utils
java.lang.Object
org.jboss.resteasy.cdi.Utils
Utility methods for detecting CDI scopes and JAX-RS components.
- Author:
- Jozef Hartinger
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
isJaxrsAnnotatedClass
(Class<?> clazz) Finds out if a given class is decorated with JAX-RS annotations.static boolean
isJaxrsComponent
(Class<?> clazz) Find out if a given class is a JAX-RS componentstatic boolean
isJaxrsResource
(Class<?> clazz) Returns true if and only if the given class is a JAX-RS root resource or a sub-resource.static boolean
isScopeDefined
(jakarta.enterprise.inject.spi.AnnotatedType<?> annotatedType, jakarta.enterprise.inject.spi.BeanManager manager) Find out if a given annotated type is explicitly bound to a scope.
-
Constructor Details
-
Utils
public Utils()
-
-
Method Details
-
isJaxrsAnnotatedClass
Finds out if a given class is decorated with JAX-RS annotations. Interfaces of the class are not scanned for JAX-RS annotations.- Parameters:
clazz
- class- Returns:
- true if a given interface has @Path annotation or if any of its methods is decorated with @Path annotation or a request method designator.
-
isJaxrsResource
Returns true if and only if the given class is a JAX-RS root resource or a sub-resource. The class itself as well as its interfaces are scanned for JAX-RS annotations.- Parameters:
clazz
- class- Returns:
- true if the given class is JAX-RS resource or sub-resource
-
isJaxrsComponent
Find out if a given class is a JAX-RS component- Parameters:
clazz
- class- Returns:
- true if and only if a give class is a JAX-RS resource, provider or jakarta.ws.rs.core.Application subclass.
-
isScopeDefined
public static boolean isScopeDefined(jakarta.enterprise.inject.spi.AnnotatedType<?> annotatedType, jakarta.enterprise.inject.spi.BeanManager manager) Find out if a given annotated type is explicitly bound to a scope.- Parameters:
annotatedType
- annotated typemanager
- bean manager- Returns:
- true if and only if a given annotated type is annotated with a scope annotation or with a stereotype which (transitively) declares a scope
-