Class ClassUtils
- java.lang.Object
-
- io.streamthoughts.azkarra.api.util.ClassUtils
-
public class ClassUtils extends Object
-
-
Constructor Summary
Constructors Constructor Description ClassUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
canBeInstantiated(Class<?> cls)
static ClassLoader
compareAndSwapLoaders(ClassLoader classLoader)
static List<Annotation>
getAllDeclaredAnnotations(Class<?> cls)
static <T extends Annotation>
List<T>getAllDeclaredAnnotationsByType(Class<?> cls, Class<T> type)
static Set<Class<?>>
getAllSuperTypes(Class<?> type)
static ClassLoader
getClassLoader()
static Set<Class<?>>
getSuperTypes(Class<?> type)
static boolean
isAnnotationOfType(Annotation annotation, Class<?> type)
static <A extends Annotation>
booleanisMethodAnnotatedWith(Method method, Class<A> annotation)
static <A extends Annotation>
booleanisSuperTypesAnnotatedWith(Class<?> component, Class<A> annotation)
static <T> T
newInstance(Class<T> c)
static <T> T
newInstance(Class<T> cls, ClassLoader classLoader)
-
-
-
Method Detail
-
newInstance
public static <T> T newInstance(Class<T> cls, ClassLoader classLoader)
-
newInstance
public static <T> T newInstance(Class<T> c)
-
compareAndSwapLoaders
public static ClassLoader compareAndSwapLoaders(ClassLoader classLoader)
-
getClassLoader
public static ClassLoader getClassLoader()
-
canBeInstantiated
public static boolean canBeInstantiated(Class<?> cls)
-
isAnnotationOfType
public static boolean isAnnotationOfType(Annotation annotation, Class<?> type)
-
getAllDeclaredAnnotations
public static List<Annotation> getAllDeclaredAnnotations(Class<?> cls)
-
getAllDeclaredAnnotationsByType
public static <T extends Annotation> List<T> getAllDeclaredAnnotationsByType(Class<?> cls, Class<T> type)
-
isMethodAnnotatedWith
public static <A extends Annotation> boolean isMethodAnnotatedWith(Method method, Class<A> annotation)
-
isSuperTypesAnnotatedWith
public static <A extends Annotation> boolean isSuperTypesAnnotatedWith(Class<?> component, Class<A> annotation)
-
-