|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.util.JBossObject
org.jboss.reflect.plugins.AbstractAnnotatedInfo
org.jboss.reflect.plugins.javassist.JavassistAnnotatedInfo
org.jboss.reflect.plugins.javassist.JavassistInheritableAnnotationHolder
org.jboss.reflect.plugins.javassist.JavassistTypeInfo
public class JavassistTypeInfo
JavassistTypeInfo.
| Field Summary |
|---|
| Fields inherited from class org.jboss.reflect.plugins.javassist.JavassistInheritableAnnotationHolder |
|---|
allAnnotations, allAnnotationsArray, ctClass |
| Fields inherited from class org.jboss.reflect.plugins.javassist.JavassistAnnotatedInfo |
|---|
annotationHelper, annotationMap, annotationsArray |
| Fields inherited from class org.jboss.util.JBossObject |
|---|
hashCode, log, toString |
| Method Summary | ||
|---|---|---|
Object |
convertValue(Object value)
Convert a value |
|
Object |
convertValue(Object value,
boolean replaceProperties)
Convert a value |
|
Object |
convertValue(Object value,
boolean replaceProperties,
boolean trim)
Convert a value |
|
boolean |
equals(Object obj)
|
|
protected ConstructorInfo |
generateConstructorInfo(javassist.CtConstructor constructor)
Generate constructor info |
|
protected ConstructorInfo |
generateConstructorInfo(org.jboss.reflect.plugins.javassist.SignatureKey key)
Generate constructor info |
|
protected FieldInfo |
generateFieldInfo(javassist.CtField field)
Generate field info |
|
protected MethodInfo |
generateMethodInfo(javassist.CtMethod method)
Generate method info |
|
protected MethodInfo |
generateMethodInfo(org.jboss.reflect.plugins.javassist.SignatureKey key)
Generate method info |
|
protected MethodInfo |
generateMethodInfo(org.jboss.reflect.plugins.javassist.SignatureKey key,
javassist.CtMethod method)
Generate method info |
|
TypeInfo[] |
getActualTypeArguments()
Get the actual type parameters |
|
protected Object |
getAnnotatedTarget()
|
|
AnnotationValue[] |
getAnnotations()
Get the annotations |
|
static Class<?> |
getArrayClass(Class<?> clazz)
Get an array class |
|
TypeInfo |
getArrayType()
Get an array type |
|
|
getAttachment(Class<T> expectedType)
Get an attachment from the type, uses the expected type as both the name and to cast the resulting object. |
|
Object |
getAttachment(String name)
Get an attachment from the type |
|
TypeInfo |
getComponentType()
Get the component type if it is a collection or an array |
|
ConstructorInfo |
getDeclaredConstructor(TypeInfo[] parameters)
Get a declared constructor |
|
ConstructorInfo[] |
getDeclaredConstructors()
Get the declared constructors |
|
FieldInfo |
getDeclaredField(String name)
Get the declared field |
|
FieldInfo[] |
getDeclaredFields()
Get the declared fields |
|
MethodInfo |
getDeclaredMethod(String name,
TypeInfo[] parameters)
Get the declared method |
|
MethodInfo[] |
getDeclaredMethods()
Get the declared methods |
|
protected JavassistTypeInfoFactoryImpl |
getFactory()
Get the factory |
|
InterfaceInfo[] |
getGenericInterfaces()
Get the generic interfaces |
|
ClassInfo |
getGenericSuperclass()
Get the generic super class |
|
protected int |
getHashCode()
|
|
InterfaceInfo[] |
getInterfaces()
Get the interfaces |
|
TypeInfo |
getKeyType()
Get the key type if it is a map |
|
int |
getModifiers()
Get the modifiers |
|
String |
getName()
Get the class name |
|
TypeInfo |
getOwnerType()
Get the owner type |
|
PackageInfo |
getPackage()
Get the package |
|
protected javassist.CtClass[] |
getParameterTypes(org.jboss.reflect.plugins.javassist.SignatureKey key)
Get the parameter types |
|
ClassInfo |
getRawType()
Get the raw type |
|
String |
getSimpleName()
Get the simple name |
|
ClassInfo |
getSuperclass()
Get the super class |
|
JavassistInheritableAnnotationHolder |
getSuperHolder()
|
|
Class<? extends Object> |
getType()
Deprecated. |
|
TypeInfoFactory |
getTypeInfoFactory()
Get the TypeInfoFactory that created this type info |
|
TypeInfo |
getValueType()
Get the value type if it is a map |
|
boolean |
isAnnotation()
Whether this type is an annotation |
|
boolean |
isArray()
Whether this type is an array |
|
boolean |
isAssignableFrom(TypeInfo info)
Mostly using |
|
boolean |
isCollection()
Whether this type is a collection |
|
boolean |
isEnum()
Whether this type is an enum |
|
boolean |
isInterface()
Whether it is an interface |
|
boolean |
isMap()
Whether this type is a map |
|
boolean |
isPrimitive()
Whether this type is a primitive |
|
boolean |
isPublic()
Whether it is public |
|
boolean |
isStatic()
Whether it is static |
|
boolean |
isVolatile()
Whether it is volatile |
|
Object |
newArrayInstance(int size)
Create a new array |
|
void |
setAttachment(String name,
Object attachment)
Set an attachment against the type. |
|
void |
toShortString(org.jboss.util.JBossStringBuilder buffer)
|
|
protected void |
toString(org.jboss.util.JBossStringBuilder buffer)
|
|
| Methods inherited from class org.jboss.reflect.plugins.javassist.JavassistInheritableAnnotationHolder |
|---|
getAllAnnotations, getAnnotation, getAnnotations, isAnnotationPresent, setupAnnotations |
| Methods inherited from class org.jboss.reflect.plugins.AbstractAnnotatedInfo |
|---|
getUnderlyingAnnotation, getUnderlyingAnnotations, isAnnotationPresent |
| Methods inherited from class org.jboss.util.JBossObject |
|---|
cacheGetHashCode, cacheToString, clone, equals, flushJBossObjectCache, getClassShortName, hashCode, list, notEqual, toShortString, toString, toStringImplementation |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public String getName()
ClassInfo
getName in interface ClassInfogetName in interface TypeInfopublic boolean isInterface()
ClassInfo
isInterface in interface ClassInfopublic String getSimpleName()
TypeInfo
getSimpleName in interface TypeInfopublic int getModifiers()
ModifierInfo
getModifiers in interface ModifierInfopublic boolean isPublic()
ModifierInfo
isPublic in interface ModifierInfopublic boolean isStatic()
ModifierInfo
isStatic in interface ModifierInfopublic boolean isVolatile()
ModifierInfo
isVolatile in interface ModifierInfo@Deprecated public Class<? extends Object> getType()
TypeInfo
getType in interface TypeInfopublic ClassInfo getSuperclass()
ClassInfo
getSuperclass in interface ClassInfopublic ClassInfo getGenericSuperclass()
ClassInfo
getGenericSuperclass in interface ClassInfopublic InterfaceInfo[] getInterfaces()
ClassInfo
getInterfaces in interface ClassInfopublic InterfaceInfo[] getGenericInterfaces()
ClassInfo
getGenericInterfaces in interface ClassInfopublic ConstructorInfo[] getDeclaredConstructors()
ClassInfo
getDeclaredConstructors in interface ClassInfopublic ConstructorInfo getDeclaredConstructor(TypeInfo[] parameters)
ClassInfo
getDeclaredConstructor in interface ClassInfoparameters - the parameters
public FieldInfo getDeclaredField(String name)
ClassInfo
getDeclaredField in interface ClassInfoname - the field name
public FieldInfo[] getDeclaredFields()
ClassInfo
getDeclaredFields in interface ClassInfo
public MethodInfo getDeclaredMethod(String name,
TypeInfo[] parameters)
ClassInfo
getDeclaredMethod in interface ClassInfoname - the method nameparameters - the parameters
public MethodInfo[] getDeclaredMethods()
ClassInfo
getDeclaredMethods in interface ClassInfopublic boolean isArray()
TypeInfo
isArray in interface TypeInfopublic boolean isCollection()
TypeInfo
isCollection in interface TypeInfopublic boolean isMap()
TypeInfo
isMap in interface TypeInfopublic boolean isAnnotation()
TypeInfo
isAnnotation in interface TypeInfopublic boolean isEnum()
TypeInfo
isEnum in interface TypeInfopublic boolean isPrimitive()
TypeInfo
isPrimitive in interface TypeInfopublic static Class<?> getArrayClass(Class<?> clazz)
clazz - the class
public TypeInfo getArrayType()
TypeInfo
getArrayType in interface TypeInfo
public Object newArrayInstance(int size)
throws Throwable
TypeInfo
newArrayInstance in interface TypeInfosize - the size
Throwable - for any errorpublic boolean isAssignableFrom(TypeInfo info)
TypeInfo
isAssignableFrom in interface TypeInfoinfo - type info
NumberInfo tests for progressionpublic TypeInfoFactory getTypeInfoFactory()
TypeInfo
getTypeInfoFactory in interface TypeInfo
public Object convertValue(Object value)
throws Throwable
TypeInfo
convertValue in interface TypeInfovalue - the original value
Throwable - for any error
public Object convertValue(Object value,
boolean replaceProperties)
throws Throwable
TypeInfo
convertValue in interface TypeInfovalue - the original valuereplaceProperties - whether to replace properties
Throwable - for any error
public Object convertValue(Object value,
boolean replaceProperties,
boolean trim)
throws Throwable
TypeInfo
convertValue in interface TypeInfovalue - the original valuereplaceProperties - whether to replace propertiestrim - do we trim before conversion
Throwable - for any errorprotected int getHashCode()
getHashCode in class org.jboss.util.JBossObjectpublic boolean equals(Object obj)
equals in class Objectpublic void toShortString(org.jboss.util.JBossStringBuilder buffer)
toShortString in interface org.jboss.util.JBossInterfacetoShortString in class org.jboss.util.JBossObjectprotected void toString(org.jboss.util.JBossStringBuilder buffer)
toString in class org.jboss.util.JBossObjectprotected JavassistTypeInfoFactoryImpl getFactory()
protected ConstructorInfo generateConstructorInfo(javassist.CtConstructor constructor)
constructor - the constructor
protected ConstructorInfo generateConstructorInfo(org.jboss.reflect.plugins.javassist.SignatureKey key)
key - the key
protected FieldInfo generateFieldInfo(javassist.CtField field)
field - the field
protected MethodInfo generateMethodInfo(org.jboss.reflect.plugins.javassist.SignatureKey key)
key - the key
protected MethodInfo generateMethodInfo(javassist.CtMethod method)
method - the method
protected MethodInfo generateMethodInfo(org.jboss.reflect.plugins.javassist.SignatureKey key,
javassist.CtMethod method)
key - the keymethod - the method
protected javassist.CtClass[] getParameterTypes(org.jboss.reflect.plugins.javassist.SignatureKey key)
key - the key
protected Object getAnnotatedTarget()
public AnnotationValue[] getAnnotations()
AnnotatedInfo
getAnnotations in interface AnnotatedInfogetAnnotations in class JavassistInheritableAnnotationHolderpublic JavassistInheritableAnnotationHolder getSuperHolder()
getSuperHolder in class JavassistInheritableAnnotationHolderpublic TypeInfo[] getActualTypeArguments()
ClassInfo
getActualTypeArguments in interface ClassInfopublic TypeInfo getOwnerType()
ClassInfo
getOwnerType in interface ClassInfopublic ClassInfo getRawType()
ClassInfo
getRawType in interface ClassInfopublic TypeInfo getComponentType()
ClassInfo
getComponentType in interface ClassInfopublic TypeInfo getKeyType()
ClassInfo
getKeyType in interface ClassInfopublic TypeInfo getValueType()
ClassInfo
getValueType in interface ClassInfopublic PackageInfo getPackage()
ClassInfo
getPackage in interface ClassInfo
public void setAttachment(String name,
Object attachment)
TypeInfoIf you add a future object, subsequent gets will wait for the result
WARNING: Be careful about what you put in here. Don't create references across classloaders, if you are not sure add a WeakReference to the information.
setAttachment in interface TypeInfoname - the nameattachment - the attachment, pass null to remove an attachmentpublic <T> T getAttachment(Class<T> expectedType)
TypeInfo
getAttachment in interface TypeInfoT - the expected typeexpectedType - the expected type
public Object getAttachment(String name)
TypeInfo
getAttachment in interface TypeInfoname - the name
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||