Package org.jboss.resteasy.cdi
Class Utils
- java.lang.Object
 - 
- org.jboss.resteasy.cdi.Utils
 
 
- 
public class Utils extends Object
Utility methods for detecting CDI scopes and JAX-RS components.- Author:
 - Jozef Hartinger
 
 
- 
- 
Constructor Summary
Constructors Constructor Description Utils() 
- 
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanisJaxrsAnnotatedClass(Class<?> clazz)Finds out if a given class is decorated with JAX-RS annotations.static booleanisJaxrsComponent(Class<?> clazz)Find out if a given class is a JAX-RS componentstatic booleanisJaxrsResource(Class<?> clazz)Returns true if and only if the given class is a JAX-RS root resource or a sub-resource.static booleanisScopeDefined(javax.enterprise.inject.spi.AnnotatedType<?> annotatedType, javax.enterprise.inject.spi.BeanManager manager)Find out if a given annotated type is explicitly bound to a scope. 
 - 
 
- 
- 
Method Detail
- 
isJaxrsAnnotatedClass
public static boolean isJaxrsAnnotatedClass(Class<?> clazz)
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
public static boolean isJaxrsResource(Class<?> clazz)
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
public static boolean isJaxrsComponent(Class<?> clazz)
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 javax.ws.rs.core.Application subclass.
 
 
- 
isScopeDefined
public static boolean isScopeDefined(javax.enterprise.inject.spi.AnnotatedType<?> annotatedType, javax.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
 
 
 - 
 
 -