|
JBoss Reflection 2.2.1.SP1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.util.collection.WeakTypeCache<TypeInfo>
org.jboss.reflect.plugins.introspection.IntrospectionTypeInfoFactoryImpl
public class IntrospectionTypeInfoFactoryImpl
An introspection type factory.
Method Summary | ||
---|---|---|
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)
|
|
protected TypeInfo |
getParameterizedType(ParameterizedType type)
Overrides the WeakTypeCache.getParameterizedType(ParameterizedType)
method so that parameterized types are not cached when getTypeInfo(Type) is called
with a ParameterizedType with no information about the classloader. |
|
ClassInfo |
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 |
|
protected
|
getTypeVariable(TypeVariable<D> type)
|
|
TypeInfo |
getValueType(ClassInfo classInfo)
Get the value type for a map |
|
protected TypeInfo |
getWildcardType(WildcardType type)
|
|
protected TypeInfo |
instantiate(Class<?> clazz)
|
|
protected TypeInfo |
instantiate(ParameterizedType type)
|
|
protected static Type |
locateActualType(Class reference,
int parameter,
Class clazz,
Type type)
|
|
protected TypeInfo |
peek(ParameterizedType type)
|
|
protected void |
put(ParameterizedType type,
TypeInfo result)
|
|
protected TypeInfo |
resolveComplexTypeInfo(ClassLoader cl,
String name)
Resolve complex type info. |
Methods inherited from class org.jboss.util.collection.WeakTypeCache |
---|
get, get, getClass, getClassLoaderCache, peek, put |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public void generateTypeInfo(Class<?> clazz, ClassInfoImpl info)
clazz
- the classinfo
- the class infopublic ClassInfo getSuperClass(ClassInfoImpl classInfo)
ClassInfoHelper
getSuperClass
in interface ClassInfoHelper
classInfo
- the class info
public ClassInfo getGenericSuperClass(ClassInfoImpl classInfo)
ClassInfoHelper
getGenericSuperClass
in interface ClassInfoHelper
classInfo
- the class info
public AnnotationValue[] getAnnotations(Object obj)
AnnotationHelper
getAnnotations
in interface AnnotationHelper
obj
- the annotated object
public AnnotationValue createAnnotationValue(AnnotationInfo info, Object ann)
AnnotationHelper
createAnnotationValue
in interface AnnotationHelper
info
- the annotation infoann
- the underlying annotation
public ConstructorInfoImpl[] getConstructors(ClassInfoImpl classInfo)
ClassInfoHelper
getConstructors
in interface ClassInfoHelper
classInfo
- the class info
public FieldInfoImpl[] getFields(ClassInfoImpl classInfo)
ClassInfoHelper
getFields
in interface ClassInfoHelper
classInfo
- the class info
public MethodInfoImpl[] getMethods(ClassInfoImpl classInfo)
ClassInfoHelper
getMethods
in interface ClassInfoHelper
classInfo
- the class info
public InterfaceInfo[] getInterfaces(ClassInfoImpl classInfo)
ClassInfoHelper
getInterfaces
in interface ClassInfoHelper
classInfo
- the class info
public InterfaceInfo[] getGenericInterfaces(ClassInfoImpl classInfo)
ClassInfoHelper
getGenericInterfaces
in interface ClassInfoHelper
classInfo
- the class info
public PackageInfoImpl getPackage(ClassInfoImpl classInfo)
ClassInfoHelper
getPackage
in interface ClassInfoHelper
classInfo
- the class info
public TypeInfo[] getTypeInfos(Type[] classes)
classes
- the classes
public ClassInfo[] getClassInfos(Type[] classes)
classes
- the classes
public TypeInfo getTypeInfo(Class<?> clazz)
TypeInfoFactory
getTypeInfo
in interface ClassInfoHelper
getTypeInfo
in interface TypeInfoFactory
clazz
- the class
public TypeInfo getTypeInfo(Type type)
TypeInfoFactory
getTypeInfo
in interface TypeInfoFactory
type
- the type
public TypeInfo getTypeInfo(String name, ClassLoader cl) throws ClassNotFoundException
TypeInfoFactory
getTypeInfo
in interface TypeInfoFactory
name
- the class namecl
- the classloader
ClassNotFoundException
- when there is no such classprotected TypeInfo getGenericArrayType(GenericArrayType type)
getGenericArrayType
in class org.jboss.util.collection.WeakTypeCache<TypeInfo>
type
- the array type
protected TypeInfo resolveComplexTypeInfo(ClassLoader cl, String name) throws ClassNotFoundException
cl
- the classloader to usename
- the class name
ClassNotFoundException
- for any errorprotected TypeInfo instantiate(Class<?> clazz)
instantiate
in class org.jboss.util.collection.WeakTypeCache<TypeInfo>
protected TypeInfo getParameterizedType(ParameterizedType type)
WeakTypeCache.getParameterizedType(ParameterizedType)
method so that parameterized types are not cached when getTypeInfo(Type) is called
with a ParameterizedType with no information about the classloader.
getParameterizedType
in class org.jboss.util.collection.WeakTypeCache<TypeInfo>
type
- the parameterized type
protected TypeInfo instantiate(ParameterizedType type)
instantiate
in class org.jboss.util.collection.WeakTypeCache<TypeInfo>
protected <D extends GenericDeclaration> TypeInfo getTypeVariable(TypeVariable<D> type)
getTypeVariable
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 Field[] getDeclaredFields(Class<?> clazz)
protected Method[] getDeclaredMethods(Class<?> clazz)
protected AnnotationValue[][] getParameterAnnotations(Annotation[][] annotations)
public TypeInfo[] getActualTypeArguments(ParameterizedClassInfo classInfo)
ClassInfoHelper
getActualTypeArguments
in interface ClassInfoHelper
classInfo
- the parameterized class info
public TypeInfo getOwnerType(ParameterizedClassInfo classInfo)
ClassInfoHelper
getOwnerType
in interface ClassInfoHelper
classInfo
- the parameterized class info
public TypeInfo getComponentType(ClassInfo classInfo)
ClassInfoHelper
getComponentType
in interface ClassInfoHelper
classInfo
- the class info
public TypeInfo getKeyType(ClassInfo classInfo)
ClassInfoHelper
getKeyType
in interface ClassInfoHelper
classInfo
- the class info
public TypeInfo getValueType(ClassInfo classInfo)
ClassInfoHelper
getValueType
in interface ClassInfoHelper
classInfo
- the class info
protected TypeInfo findActualType(ClassInfo classInfo, Class<?> reference, int parameter)
protected static Type locateActualType(Class reference, int parameter, Class clazz, Type type)
protected TypeInfo getWildcardType(WildcardType type)
getWildcardType
in class org.jboss.util.collection.WeakTypeCache<TypeInfo>
protected TypeInfo peek(ParameterizedType type)
peek
in class org.jboss.util.collection.WeakTypeCache<TypeInfo>
protected void put(ParameterizedType type, TypeInfo result)
put
in class org.jboss.util.collection.WeakTypeCache<TypeInfo>
|
JBoss Reflection 2.2.1.SP1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |