|
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.JBossObject
org.jboss.reflect.spi.AbstractTypeInfo
org.jboss.reflect.spi.DelegateClassInfo
public class DelegateClassInfo
Delegate ClassInfo
Field Summary | |
---|---|
protected ClassInfo |
delegate
The delegate |
Fields inherited from class org.jboss.util.JBossObject |
---|
hashCode, log, toString |
Fields inherited from interface org.jboss.reflect.spi.ModifierInfo |
---|
ABSTRACT, CONSTANT, FINAL, PACKAGE, PACKAGE_ABSTRACT, PACKAGE_CONSTANT, PACKAGE_STATIC, PRIVATE, PRIVATE_CONSTANT, PRIVATE_STATIC, PROTECTED, PROTECTED_ABSTRACT, PROTECTED_CONSTANT, PROTECTED_STATIC, PUBLIC, PUBLIC_ABSTRACT, PUBLIC_CONSTANT, PUBLIC_STATIC, STATIC |
Constructor Summary | |
---|---|
DelegateClassInfo(ClassInfo delegate)
Create delegate class info |
|
DelegateClassInfo(ClassInfo delegate,
boolean allowNull)
Create delegate class info |
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)
|
|
boolean |
equals(Object obj,
Set<String> doneTypeVariables)
|
|
TypeInfo[] |
getActualTypeArguments()
Get the actual type parameters |
|
AnnotationValue |
getAnnotation(String name)
Get an annotation |
|
AnnotationValue[] |
getAnnotations()
Get the annotations |
|
TypeInfo |
getArrayType()
Get an array type |
|
ClassLoader |
getClassLoader()
Get the classloader for this class info. |
|
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 |
|
ClassInfo |
getDelegate()
|
|
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 |
|
ClassInfo |
getRawType()
Get the raw type |
|
String |
getSimpleName()
Get the simple name |
|
ClassInfo |
getSuperclass()
Get the super class |
|
Class<?> |
getType()
Deprecated. |
|
TypeInfoFactory |
getTypeInfoFactory()
Get the TypeInfoFactory that created this type info |
|
String |
getTypeVariable()
Gets the type variable if we are a parameterized type which is part of a parameterized type and there is a type variable for this type. |
|
|
getUnderlyingAnnotation(Class<T> annotationType)
Get an underlying annotation |
|
Annotation[] |
getUnderlyingAnnotations()
Get the underlying annotations |
|
TypeInfo |
getValueType()
Get the value type if it is a map |
|
boolean |
isAnnotation()
Whether this type is an annotation |
|
boolean |
isAnnotationPresent(Class<? extends Annotation> annotationType)
Test whether an annotation is present |
|
boolean |
isAnnotationPresent(String name)
Test whether an annotation is present |
|
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 |
isInitialized()
Whether the delegate is initialized |
|
boolean |
isInstance(Object object)
Is object instance of this type info. |
|
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()
|
|
boolean |
isStatic()
Whether it is static |
|
boolean |
isVolatile()
Whether it is volatile |
|
Object |
newArrayInstance(int size)
Create a new array |
|
void |
setDelegate(ClassInfo delegate)
Set the delegate |
|
void |
setDelegate(TypeInfo delegate)
Set the delegate |
|
void |
toShortString(org.jboss.util.JBossStringBuilder buffer)
|
|
protected void |
toString(org.jboss.util.JBossStringBuilder buffer)
|
Methods inherited from class org.jboss.reflect.spi.AbstractTypeInfo |
---|
getAttachment, getAttachment, setAttachment |
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 |
Methods inherited from interface org.jboss.util.JBossInterface |
---|
clone, toShortString |
Methods inherited from interface org.jboss.reflect.spi.TypeInfo |
---|
getAttachment, getAttachment, setAttachment |
Field Detail |
---|
protected ClassInfo delegate
Constructor Detail |
---|
public DelegateClassInfo(ClassInfo delegate)
delegate
- the raw array info
IllegalArgumentException
- for a null delegatepublic DelegateClassInfo(ClassInfo delegate, boolean allowNull)
delegate
- the raw array infoallowNull
- whether to allow a null delegate
IllegalArgumentException
- when delegate
is null
and
allowNull
equals false
Method Detail |
---|
public boolean isInitialized()
public void setDelegate(TypeInfo delegate)
delegate
- the delegate
IllegalArgumentException
- for a null delegate or it is not a ClassInfopublic void setDelegate(ClassInfo delegate)
delegate
- the delegate
IllegalArgumentException
- for a null delegatepublic ClassInfo getDelegate()
public TypeInfoFactory getTypeInfoFactory()
TypeInfo
getTypeInfoFactory
in interface TypeInfo
public ConstructorInfo getDeclaredConstructor(TypeInfo... parameters)
ClassInfo
getDeclaredConstructor
in interface ClassInfo
parameters
- the parameters
public ConstructorInfo[] getDeclaredConstructors()
ClassInfo
getDeclaredConstructors
in interface ClassInfo
public FieldInfo getDeclaredField(String name)
ClassInfo
getDeclaredField
in interface ClassInfo
name
- the field name
public FieldInfo[] getDeclaredFields()
ClassInfo
getDeclaredFields
in interface ClassInfo
public MethodInfo getDeclaredMethod(String name, TypeInfo... parameters)
ClassInfo
getDeclaredMethod
in interface ClassInfo
name
- the method nameparameters
- the parameters
public MethodInfo[] getDeclaredMethods()
ClassInfo
getDeclaredMethods
in interface ClassInfo
public InterfaceInfo[] getGenericInterfaces()
ClassInfo
getGenericInterfaces
in interface ClassInfo
public ClassInfo getGenericSuperclass()
ClassInfo
getGenericSuperclass
in interface ClassInfo
public InterfaceInfo[] getInterfaces()
ClassInfo
getInterfaces
in interface ClassInfo
public String getName()
ClassInfo
getName
in interface ClassInfo
getName
in interface TypeInfo
public String getSimpleName()
TypeInfo
getSimpleName
in interface TypeInfo
public ClassInfo getSuperclass()
ClassInfo
getSuperclass
in interface ClassInfo
public boolean isInterface()
ClassInfo
isInterface
in interface ClassInfo
public AnnotationValue getAnnotation(String name)
AnnotatedInfo
getAnnotation
in interface AnnotatedInfo
name
- the name
public AnnotationValue[] getAnnotations()
AnnotatedInfo
getAnnotations
in interface AnnotatedInfo
public boolean isAnnotationPresent(String name)
AnnotatedInfo
isAnnotationPresent
in interface AnnotatedInfo
name
- the name
public <T extends Annotation> T getUnderlyingAnnotation(Class<T> annotationType)
AnnotatedInfo
getUnderlyingAnnotation
in interface AnnotatedInfo
T
- the annotation typeannotationType
- the annotationType
public Annotation[] getUnderlyingAnnotations()
AnnotatedInfo
getUnderlyingAnnotations
in interface AnnotatedInfo
public boolean isAnnotationPresent(Class<? extends Annotation> annotationType)
AnnotatedInfo
isAnnotationPresent
in interface AnnotatedInfo
public int getModifiers()
ModifierInfo
getModifiers
in interface ModifierInfo
public boolean isPublic()
isPublic
in interface ModifierInfo
public boolean isStatic()
ModifierInfo
isStatic
in interface ModifierInfo
public boolean isVolatile()
ModifierInfo
isVolatile
in interface ModifierInfo
public Object convertValue(Object value) throws Throwable
TypeInfo
convertValue
in interface TypeInfo
value
- the original value
Throwable
- for any errorpublic Object convertValue(Object value, boolean replaceProperties) throws Throwable
TypeInfo
convertValue
in interface TypeInfo
value
- the original valuereplaceProperties
- whether to replace properties
Throwable
- for any errorpublic Object convertValue(Object value, boolean replaceProperties, boolean trim) throws Throwable
TypeInfo
convertValue
in interface TypeInfo
value
- the original valuereplaceProperties
- whether to replace propertiestrim
- do we trim before conversion
Throwable
- for any errorpublic TypeInfo getArrayType()
TypeInfo
getArrayType
in interface TypeInfo
@Deprecated public Class<?> getType()
TypeInfo
getType
in interface TypeInfo
public ClassLoader getClassLoader()
TypeInfo
getClassLoader
in interface TypeInfo
public boolean isAnnotation()
TypeInfo
isAnnotation
in interface TypeInfo
isAnnotation
in class AbstractTypeInfo
public boolean isCollection()
TypeInfo
isCollection
in interface TypeInfo
isCollection
in class AbstractTypeInfo
public boolean isMap()
TypeInfo
isMap
in interface TypeInfo
isMap
in class AbstractTypeInfo
public boolean isArray()
TypeInfo
isArray
in interface TypeInfo
isArray
in class AbstractTypeInfo
public boolean isEnum()
TypeInfo
isEnum
in interface TypeInfo
isEnum
in class AbstractTypeInfo
public boolean isPrimitive()
TypeInfo
isPrimitive
in interface TypeInfo
isPrimitive
in class AbstractTypeInfo
public Object newArrayInstance(int size) throws Throwable
TypeInfo
newArrayInstance
in interface TypeInfo
size
- the size
Throwable
- for any errorpublic boolean isAssignableFrom(TypeInfo info)
TypeInfo
isAssignableFrom
in interface TypeInfo
info
- type info
PrimitiveInfo tests for progression
public boolean isInstance(Object object)
TypeInfo
isInstance
in interface TypeInfo
object
- the object to check
object
is an instance of this classPrimitiveInfo tests for progression
public TypeInfo[] getActualTypeArguments()
ClassInfo
getActualTypeArguments
in interface ClassInfo
public TypeInfo getOwnerType()
ClassInfo
getOwnerType
in interface ClassInfo
public ClassInfo getRawType()
ClassInfo
getRawType
in interface ClassInfo
public TypeInfo getComponentType()
ClassInfo
getComponentType
in interface ClassInfo
public TypeInfo getKeyType()
ClassInfo
getKeyType
in interface ClassInfo
public TypeInfo getValueType()
ClassInfo
getValueType
in interface ClassInfo
public PackageInfo getPackage()
ClassInfo
getPackage
in interface ClassInfo
protected int getHashCode()
getHashCode
in class org.jboss.util.JBossObject
public boolean equals(Object obj)
equals
in class Object
public boolean equals(Object obj, Set<String> doneTypeVariables)
public String getTypeVariable()
ClassInfo
getTypeVariable
in interface ClassInfo
public void toShortString(org.jboss.util.JBossStringBuilder buffer)
toShortString
in interface org.jboss.util.JBossInterface
toShortString
in class org.jboss.util.JBossObject
protected void toString(org.jboss.util.JBossStringBuilder buffer)
toString
in class org.jboss.util.JBossObject
|
JBoss Reflection 2.2.1.SP1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |