|
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.WeakClassCache<TypeInfo>
org.jboss.reflect.plugins.bytecode.BytecodeTypeInfoFactoryImpl
public class BytecodeTypeInfoFactoryImpl
A javassist type factory. TODO: need to fix the cl stuff
| Nested Class Summary | |
|---|---|
protected static class |
BytecodeTypeInfoFactoryImpl.ModifiableArrayType
Wrapper around SignatureAttribute.ArrayType to make it easier to
create the name used to look up the array type infos
in the cache |
| Field Summary |
|---|
| Fields inherited from class org.jboss.util.collection.WeakClassCache |
|---|
cache |
| Constructor Summary | |
|---|---|
BytecodeTypeInfoFactoryImpl()
|
|
| Method Summary | |
|---|---|
AnnotationValue |
createAnnotationValue(AnnotationInfo info,
Object ann)
Create an annotation from the underlying implementation and its info type |
protected TypeInfo |
createTypeInfoForTypeArgument(javassist.bytecode.SignatureAttribute.TypeArgument arg,
ClassLoader loader,
org.jboss.reflect.plugins.bytecode.BytecodeTypeVariableSpy spy)
Gets the type info for a javassist type argument |
protected void |
generate(Class clazz,
TypeInfo result)
|
TypeInfo |
get(Class clazz)
Get the information for a class |
protected TypeInfo |
get(ClassBytes classBytes,
Class<?> clazz,
String name,
ClassLoader cl,
boolean delegateToReflectIfNotFound)
Get the information for a class |
TypeInfo |
get(String name,
ClassLoader cl)
Get the information for a class |
protected TypeInfo |
get(String name,
ClassLoader cl,
Class<?> clazz)
Get the information for a class |
AnnotationValue[] |
getAnnotations(Object obj)
Get the annotations for the annotated object |
protected Map<String,WeakReference<TypeInfo>> |
getClassLoaderCache(ClassLoader cl)
Gets the classloader cache for the passed in classloader. |
ClassLoaderFinder |
getClassLoaderFinder()
|
protected ArrayInfo |
getGenericArrayType(ClassLoader cl,
BytecodeTypeInfoFactoryImpl.ModifiableArrayType type,
org.jboss.reflect.plugins.bytecode.BytecodeTypeVariableSpy spy)
Recursively get the type info for a javassist array type |
protected ArrayInfo |
getGenericArrayType(ClassLoader cl,
javassist.bytecode.SignatureAttribute.ArrayType type,
org.jboss.reflect.plugins.bytecode.BytecodeTypeVariableSpy spy)
Get the type info for a javassist array type |
protected TypeInfo |
getGenericArrayType(GenericArrayType type)
Get the type info for a reflect generic array type |
protected TypeInfo |
getParameterizedType(ParameterizedType type)
Creates a type info from a reflect generic paramemeterized type |
TypeInfo |
getTypeInfo(Class<?> clazz)
Get a type info |
protected TypeInfo |
getTypeInfo(ClassLoader loader,
javassist.bytecode.SignatureAttribute.ClassType type,
org.jboss.reflect.plugins.bytecode.BytecodeTypeVariableSpy spy)
Gets the type info for a javassist generic class type |
protected TypeInfo |
getTypeInfo(ClassLoader loader,
javassist.bytecode.SignatureAttribute.Type type,
org.jboss.reflect.plugins.bytecode.BytecodeTypeVariableSpy spy)
Gets the type info for a javassist type |
TypeInfo |
getTypeInfo(String name,
ClassLoader cl)
Gets the type info for a class |
TypeInfo |
getTypeInfo(Type type)
Gets the type info for a reflect type |
protected TypeInfo |
getTypeVariable(TypeVariable<?> type)
Get the type info for a reflect TypeVariable |
protected TypeInfo |
getWildcardType(WildcardType type)
Gets the type info for a reflect wildcard type |
protected TypeInfo |
instantiate(Class clazz)
|
protected TypeInfo |
instantiate(String name,
ClassBytes classBytes,
Class<?> clazz)
|
void |
setClassLoaderFinder(ClassLoaderFinder finder)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BytecodeTypeInfoFactoryImpl()
| Method Detail |
|---|
public ClassLoaderFinder getClassLoaderFinder()
public void setClassLoaderFinder(ClassLoaderFinder finder)
protected TypeInfo instantiate(Class clazz)
instantiate in class org.jboss.util.collection.WeakClassCache<TypeInfo>
protected TypeInfo instantiate(String name,
ClassBytes classBytes,
Class<?> clazz)
protected void generate(Class clazz,
TypeInfo result)
generate in class org.jboss.util.collection.WeakClassCache<TypeInfo>public TypeInfo getTypeInfo(Class<?> clazz)
TypeInfoFactory
getTypeInfo in interface TypeInfoFactoryclazz - the class
public TypeInfo getTypeInfo(String name,
ClassLoader cl)
throws ClassNotFoundException
getTypeInfo in interface TypeInfoFactorytype - the type
ClassNotFoundException - when there is no such classpublic TypeInfo getTypeInfo(Type type)
getTypeInfo in interface TypeInfoFactorytype - the type
public TypeInfo get(String name,
ClassLoader cl)
throws ClassNotFoundException
get in class org.jboss.util.collection.WeakClassCache<TypeInfo>name - the namecl - the classloader
ClassNotFoundException - when the class cannot be foundpublic TypeInfo get(Class clazz)
get in class org.jboss.util.collection.WeakClassCache<TypeInfo>clazz - the class
protected TypeInfo get(String name,
ClassLoader cl,
Class<?> clazz)
throws ClassNotFoundException
name - the namecl - the classloaderclazz - the class
ClassNotFoundException - when the class cannot be found
protected TypeInfo get(ClassBytes classBytes,
Class<?> clazz,
String name,
ClassLoader cl,
boolean delegateToReflectIfNotFound)
throws ClassNotFoundException
classBytes - the class bytes, may be nullclazz - the class, may be nullname - the name of the classcl - the class loader initiating the lookup
IllegalArgumentException - if either name or cl are null
ClassNotFoundExceptionpublic AnnotationValue[] getAnnotations(Object obj)
AnnotationHelper
getAnnotations in interface AnnotationHelperobj - the annotated object
public AnnotationValue createAnnotationValue(AnnotationInfo info,
Object ann)
AnnotationHelper
createAnnotationValue in interface AnnotationHelperinfo - the annotation infoann - the underlying annotation
protected TypeInfo getParameterizedType(ParameterizedType type)
type - the parameterized type
protected TypeInfo getTypeInfo(ClassLoader loader,
javassist.bytecode.SignatureAttribute.Type type,
org.jboss.reflect.plugins.bytecode.BytecodeTypeVariableSpy spy)
loader - the class loadertype - the class typespy - used to determine actual types of type variables
protected TypeInfo getTypeInfo(ClassLoader loader,
javassist.bytecode.SignatureAttribute.ClassType type,
org.jboss.reflect.plugins.bytecode.BytecodeTypeVariableSpy spy)
loader - the class loader of the raw classparameterloaders - the class of thetype - the class typespy - used to determine actual types of type variables
protected TypeInfo createTypeInfoForTypeArgument(javassist.bytecode.SignatureAttribute.TypeArgument arg,
ClassLoader loader,
org.jboss.reflect.plugins.bytecode.BytecodeTypeVariableSpy spy)
arg - the type argumentloader - the class loaderspy - used to determine actual types of type variables
protected TypeInfo getWildcardType(WildcardType type)
type - the wildcard type
protected Map<String,WeakReference<TypeInfo>> getClassLoaderCache(ClassLoader cl)
getClassLoaderCache in class org.jboss.util.collection.WeakClassCache<TypeInfo>cl - the classloader. If null is used, the Thread context classloader will be used instead
protected TypeInfo getGenericArrayType(GenericArrayType type)
type - the array type
protected ArrayInfo getGenericArrayType(ClassLoader cl,
javassist.bytecode.SignatureAttribute.ArrayType type,
org.jboss.reflect.plugins.bytecode.BytecodeTypeVariableSpy spy)
cl - the classloadertype - the array typespy - used to determine actual types of type variables
protected ArrayInfo getGenericArrayType(ClassLoader cl,
BytecodeTypeInfoFactoryImpl.ModifiableArrayType type,
org.jboss.reflect.plugins.bytecode.BytecodeTypeVariableSpy spy)
cl - the classloadertype - the array typespy - used to determine actual types of type variables
protected TypeInfo getTypeVariable(TypeVariable<?> type)
type - the type variable
|
JBoss Reflection 2.2.1.SP1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||