public final class Classes extends Object
| Modifier and Type | Field and Description | 
|---|---|
static Function<Type,Class<?>> | 
RAW_CLASS
Function that extract the raw class of a type. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
static Specification<ModelDescriptor> | 
assignableTypeSpecification(Class type)  | 
static Iterable<Class<?>> | 
classHierarchy(Class<?> type)  | 
static String | 
denormalizeURIToClass(String uriPart)  | 
static Specification<ModelDescriptor> | 
exactTypeSpecification(Class type)  | 
static <AnnotationType extends Annotation>  | 
findAnnotationOfTypeOrAnyOfSuperTypes(Class<?> type,
                                     Class<AnnotationType> annotationClass)  | 
static <T> Function<Type,Iterable<T>> | 
forClassHierarchy(Function<Class<?>,Iterable<T>> function)  | 
static <T> Function<Type,Iterable<T>> | 
forTypes(Function<Type,Iterable<T>> function)  | 
static Specification<Class<?>> | 
hasModifier(int classModifier)  | 
static Specification<Object> | 
instanceOf(Class clazz)  | 
static Iterable<? extends Type> | 
interfacesOf(Iterable<? extends Type> types)  | 
static Iterable<Type> | 
interfacesOf(Type type)  | 
static Set<Class<?>> | 
interfacesWithMethods(Set<Class<?>> interfaces)  | 
static Specification<Class<?>> | 
isAssignableFrom(Class clazz)  | 
static Specification<Member> | 
memberNamed(String name)  | 
static Specification<ModelDescriptor> | 
modelTypeSpecification(String className)  | 
static String | 
normalizeClassToURI(String className)  | 
static Type | 
resolveTypeVariable(TypeVariable name,
                   Class declaringClass,
                   Class topClass)
Given a type variable, find what it resolves to given the declaring class where type
 variable was found and a top class that extends the declaring class. 
 | 
static String | 
simpleGenericNameOf(Type type)  | 
static Function<Type,String> | 
toClassName()  | 
static String | 
toClassName(String uri)
Get class name from a URI 
 | 
static String | 
toString(Iterable<? extends Class> type)  | 
static String | 
toURI(Class clazz)
Get URI for a class. 
 | 
static String | 
toURI(String className)
Get URI for a class name. 
 | 
static Type | 
typeOf(AccessibleObject from)  | 
static Iterable<Type> | 
typesOf(Iterable<Type> types)  | 
static Iterable<Type> | 
typesOf(Type type)  | 
static Type | 
wrapperClass(Type type)  | 
public static Type typeOf(AccessibleObject from)
public static Specification<Class<?>> isAssignableFrom(Class clazz)
public static Specification<Object> instanceOf(Class clazz)
public static Specification<Class<?>> hasModifier(int classModifier)
public static <T> Function<Type,Iterable<T>> forClassHierarchy(Function<Class<?>,Iterable<T>> function)
public static <AnnotationType extends Annotation> AnnotationType findAnnotationOfTypeOrAnyOfSuperTypes(Class<?> type, Class<AnnotationType> annotationClass)
public static Specification<Member> memberNamed(String name)
public static Type resolveTypeVariable(TypeVariable name, Class declaringClass, Class topClass)
name - The TypeVariable name.declaringClass - The class where the TypeVariable is declared.topClass - The top class that extends the declaringClasspublic static String toURI(Class clazz) throws NullPointerException
clazz - classNullPointerException - if clazz is nullpublic static String toURI(String className) throws NullPointerException
Example:
Class name com.example.Foo$Bar is converted to URI urn:qi4j:com.example.Foo-Bar
className - class nameNullPointerException - if className is nullpublic static String toClassName(String uri) throws NullPointerException
uri - URINullPointerException - if uri is nullpublic static Specification<ModelDescriptor> modelTypeSpecification(String className)
public static Specification<ModelDescriptor> exactTypeSpecification(Class type)
public static Specification<ModelDescriptor> assignableTypeSpecification(Class type)