public class JavassistTypeInfoFactoryImpl extends org.jboss.util.collection.WeakClassCache implements TypeInfoFactory, AnnotationHelper
Constructor and Description |
---|
JavassistTypeInfoFactoryImpl() |
Modifier and Type | Method and Description |
---|---|
protected String |
convertName(javassist.CtClass clazz)
Convert name
|
AnnotationValue |
createAnnotationValue(AnnotationInfo info,
Object ann)
Create an annotation from the underlying implementation and its info type
|
protected void |
generate(Class clazz,
Object result) |
AnnotationValue[] |
getAnnotations(Object obj)
Get the annotations for the annotated object
|
protected javassist.CtClass |
getCtClass(String name)
Get the CtClass
|
TypeInfo |
getTypeInfo(Class<?> clazz)
Get a type info
|
protected TypeInfo |
getTypeInfo(javassist.CtClass ctClass)
Get the type info
|
TypeInfo |
getTypeInfo(String name,
ClassLoader cl)
Get a type info
|
TypeInfo |
getTypeInfo(Type type)
Get a type info
|
protected Object |
instantiate(Class clazz) |
static NoClassDefFoundError |
raiseClassNotFound(String name,
ClassNotFoundException e)
Raise NoClassDefFoundError for javassist not found
|
static NoClassDefFoundError |
raiseClassNotFound(String name,
javassist.NotFoundException e)
Raise NoClassDefFoundError for javassist not found
|
static NoClassDefFoundError |
raiseFieldNotFound(String name,
javassist.NotFoundException e)
Raise NoClassDefFoundError for javassist not found
|
static NoClassDefFoundError |
raiseMethodNotFound(String name,
javassist.NotFoundException e)
Raise NoClassDefFoundError for javassist not found
|
public static NoClassDefFoundError raiseClassNotFound(String name, javassist.NotFoundException e) throws NoClassDefFoundError
name
- the namee
- the not found errorNoClassDefFoundError
- alwayspublic static NoClassDefFoundError raiseClassNotFound(String name, ClassNotFoundException e) throws NoClassDefFoundError
name
- the namee
- the not found errorNoClassDefFoundError
- alwayspublic static NoClassDefFoundError raiseMethodNotFound(String name, javassist.NotFoundException e) throws NoClassDefFoundError
name
- the namee
- the not found errorNoClassDefFoundError
- alwayspublic static NoClassDefFoundError raiseFieldNotFound(String name, javassist.NotFoundException e) throws NoClassDefFoundError
name
- the namee
- the not found errorNoClassDefFoundError
- alwaysprotected Object instantiate(Class clazz)
instantiate
in class org.jboss.util.collection.WeakClassCache
protected TypeInfo getTypeInfo(javassist.CtClass ctClass)
ctClass
- the ctClassprotected String convertName(javassist.CtClass clazz)
clazz
- the classprotected javassist.CtClass getCtClass(String name)
name
- the nameprotected void generate(Class clazz, Object result)
generate
in class org.jboss.util.collection.WeakClassCache
public TypeInfo getTypeInfo(Class<?> clazz)
TypeInfoFactory
getTypeInfo
in interface TypeInfoFactory
clazz
- the classpublic TypeInfo getTypeInfo(String name, ClassLoader cl) throws ClassNotFoundException
TypeInfoFactory
getTypeInfo
in interface TypeInfoFactory
name
- the class namecl
- the classloaderClassNotFoundException
- when there is no such classpublic TypeInfo getTypeInfo(Type type)
TypeInfoFactory
getTypeInfo
in interface TypeInfoFactory
type
- the typepublic 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 annotationCopyright © 2014 JBoss by Red Hat. All rights reserved.