public class IntrospectionTypeInfoFactoryImpl extends org.jboss.util.collection.WeakTypeCache<TypeInfo> implements TypeInfoFactory, AnnotationHelper, ClassInfoHelper
Constructor and Description |
---|
IntrospectionTypeInfoFactoryImpl() |
Modifier and Type | Method and Description |
---|---|
AnnotationValue |
createAnnotationValue(AnnotationInfo info,
Object ann)
Create an annotation from the underlying implementation and its info type
|
protected TypeInfo |
findActualType(ClassInfo classInfo,
Class<?> reference,
int parameter) |
protected void |
generate(Class<?> clazz,
TypeInfo result) |
protected void |
generate(ParameterizedType type,
TypeInfo result) |
void |
generateTypeInfo(Class<?> clazz,
ClassInfoImpl info)
Generate the type info for a class
|
TypeInfo[] |
getActualTypeArguments(ParameterizedClassInfo classInfo)
Get the actual type parameters
|
AnnotationValue[] |
getAnnotations(Object obj)
Get the annotations for the annotated object
|
ClassInfo[] |
getClassInfos(Type[] classes)
Get the class infos for some classes
|
TypeInfo |
getComponentType(ClassInfo classInfo)
Get the component type for a collection
|
ConstructorInfoImpl[] |
getConstructors(ClassInfoImpl classInfo)
Get the constructors
|
protected Constructor<?>[] |
getDeclaredConstructors(Class<?> clazz) |
protected Field[] |
getDeclaredFields(Class<?> clazz) |
protected Method[] |
getDeclaredMethods(Class<?> clazz) |
FieldInfoImpl[] |
getFields(ClassInfoImpl classInfo)
Get the fields
|
protected TypeInfo |
getGenericArrayType(GenericArrayType type)
Get the information for an array type
|
InterfaceInfo[] |
getGenericInterfaces(ClassInfoImpl classInfo)
Get the generic interfaces
|
ClassInfo |
getGenericSuperClass(ClassInfoImpl classInfo)
Get the generic super class
|
InterfaceInfo[] |
getInterfaces(ClassInfoImpl classInfo)
Get the interfaces
|
TypeInfo |
getKeyType(ClassInfo classInfo)
Get the key type for a map
|
MethodInfoImpl[] |
getMethods(ClassInfoImpl classInfo)
Get the methods
|
TypeInfo |
getOwnerType(ParameterizedClassInfo classInfo)
Get the owner type
|
PackageInfoImpl |
getPackage(ClassInfoImpl classInfo)
Get the package for class
|
protected AnnotationValue[][] |
getParameterAnnotations(Annotation[][] annotations) |
ClassInfoImpl |
getSuperClass(ClassInfoImpl classInfo)
Get the super class
|
TypeInfo |
getTypeInfo(Class<?> clazz)
Get a type info
|
TypeInfo |
getTypeInfo(String name,
ClassLoader cl)
Get a type info
|
TypeInfo |
getTypeInfo(Type type)
Get a type info
|
TypeInfo[] |
getTypeInfos(Type[] classes)
Get the type infos for some classes
|
TypeInfo |
getValueType(ClassInfo classInfo)
Get the value type for a map
|
protected TypeInfo |
instantiate(Class<?> clazz) |
protected TypeInfo |
instantiate(ParameterizedType type) |
protected static Type |
locateActualType(Class reference,
int parameter,
Class clazz,
Type type) |
protected TypeInfo |
resolveComplexTypeInfo(ClassLoader cl,
String name)
Resolve complex type info.
|
public void generateTypeInfo(Class<?> clazz, ClassInfoImpl info)
clazz
- the classinfo
- the class infopublic ClassInfoImpl getSuperClass(ClassInfoImpl classInfo)
ClassInfoHelper
getSuperClass
in interface ClassInfoHelper
classInfo
- the class infopublic ClassInfo getGenericSuperClass(ClassInfoImpl classInfo)
ClassInfoHelper
getGenericSuperClass
in interface ClassInfoHelper
classInfo
- the class infopublic AnnotationValue[] getAnnotations(Object obj)
AnnotationHelper
getAnnotations
in interface AnnotationHelper
obj
- the annotated objectpublic AnnotationValue createAnnotationValue(AnnotationInfo info, Object ann)
AnnotationHelper
createAnnotationValue
in interface AnnotationHelper
info
- the annotation infoann
- the underlying annotationpublic ConstructorInfoImpl[] getConstructors(ClassInfoImpl classInfo)
ClassInfoHelper
getConstructors
in interface ClassInfoHelper
classInfo
- the class infopublic FieldInfoImpl[] getFields(ClassInfoImpl classInfo)
ClassInfoHelper
getFields
in interface ClassInfoHelper
classInfo
- the class infopublic MethodInfoImpl[] getMethods(ClassInfoImpl classInfo)
ClassInfoHelper
getMethods
in interface ClassInfoHelper
classInfo
- the class infopublic InterfaceInfo[] getInterfaces(ClassInfoImpl classInfo)
ClassInfoHelper
getInterfaces
in interface ClassInfoHelper
classInfo
- the class infopublic InterfaceInfo[] getGenericInterfaces(ClassInfoImpl classInfo)
ClassInfoHelper
getGenericInterfaces
in interface ClassInfoHelper
classInfo
- the class infopublic PackageInfoImpl getPackage(ClassInfoImpl classInfo)
ClassInfoHelper
getPackage
in interface ClassInfoHelper
classInfo
- the class infopublic TypeInfo[] getTypeInfos(Type[] classes)
classes
- the classespublic ClassInfo[] getClassInfos(Type[] classes)
classes
- the classespublic TypeInfo getTypeInfo(Class<?> clazz)
TypeInfoFactory
getTypeInfo
in interface ClassInfoHelper
getTypeInfo
in interface TypeInfoFactory
clazz
- the classpublic TypeInfo getTypeInfo(Type type)
TypeInfoFactory
getTypeInfo
in interface TypeInfoFactory
type
- the typepublic TypeInfo getTypeInfo(String name, ClassLoader cl) throws ClassNotFoundException
TypeInfoFactory
getTypeInfo
in interface TypeInfoFactory
name
- the class namecl
- the classloaderClassNotFoundException
- when there is no such classprotected TypeInfo getGenericArrayType(GenericArrayType type)
getGenericArrayType
in class org.jboss.util.collection.WeakTypeCache<TypeInfo>
type
- the array typeprotected TypeInfo resolveComplexTypeInfo(ClassLoader cl, String name) throws ClassNotFoundException
cl
- the classloader to usename
- the class nameClassNotFoundException
- for any errorprotected TypeInfo instantiate(Class<?> clazz)
instantiate
in class org.jboss.util.collection.WeakTypeCache<TypeInfo>
protected TypeInfo instantiate(ParameterizedType type)
instantiate
in class org.jboss.util.collection.WeakTypeCache<TypeInfo>
protected void generate(Class<?> clazz, TypeInfo result)
generate
in class org.jboss.util.collection.WeakTypeCache<TypeInfo>
protected void generate(ParameterizedType type, TypeInfo result)
generate
in class org.jboss.util.collection.WeakTypeCache<TypeInfo>
protected Constructor<?>[] getDeclaredConstructors(Class<?> clazz)
protected AnnotationValue[][] getParameterAnnotations(Annotation[][] annotations)
public TypeInfo[] getActualTypeArguments(ParameterizedClassInfo classInfo)
ClassInfoHelper
getActualTypeArguments
in interface ClassInfoHelper
classInfo
- the parameterized class infopublic TypeInfo getOwnerType(ParameterizedClassInfo classInfo)
ClassInfoHelper
getOwnerType
in interface ClassInfoHelper
classInfo
- the parameterized class infopublic TypeInfo getComponentType(ClassInfo classInfo)
ClassInfoHelper
getComponentType
in interface ClassInfoHelper
classInfo
- the class infopublic TypeInfo getKeyType(ClassInfo classInfo)
ClassInfoHelper
getKeyType
in interface ClassInfoHelper
classInfo
- the class infopublic TypeInfo getValueType(ClassInfo classInfo)
ClassInfoHelper
getValueType
in interface ClassInfoHelper
classInfo
- the class infoprotected TypeInfo findActualType(ClassInfo classInfo, Class<?> reference, int parameter)
Copyright © 2013 JBoss, a division of Red Hat, Inc.. All rights reserved.