public class ObjectIntrospector
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
PUBLIC_CONSTANT_MODIFERS
Modifier requirements for style constant name fields.
|
| Modifier | Constructor and Description |
|---|---|
protected |
ObjectIntrospector(java.lang.String typeName,
java.lang.ClassLoader classLoader)
Creates a new
ObjectIntrospector for the specified
type. |
| Modifier and Type | Method and Description |
|---|---|
java.util.Set |
getConstantNames()
Returns the constant names of the object.
|
java.lang.Object |
getConstantValue(java.lang.String constantName)
Retrieves the value of the constant with the specified name.
|
java.util.Set |
getEventHandlerNames(java.lang.String eventSetName)
Returns event handler names for a given event set.
|
java.beans.EventSetDescriptor |
getEventSetDescriptor(java.lang.String eventSetName)
Returns the
EventSetDescriptor for the specified event set. |
java.util.Set |
getEventSetNames()
Returns the event set names of the object.
|
java.lang.Class |
getObjectClass()
Returns the
Class of the object being introspected. |
java.lang.Class |
getPropertyClass(java.lang.String propertyName)
Returns the
Class of a specific property. |
int |
getPropertyCount()
Returns the number of mutable properties provided by the introspected
Object. |
java.lang.String |
getPropertyDefinitionConcreteType(java.lang.String propertyName)
Returns the name of the type that defines the specified property.
|
java.lang.String |
getPropertyDefinitionType(java.lang.String propertyName)
Returns the name of the type that defines the specified property.
|
java.beans.PropertyDescriptor |
getPropertyDescriptor(java.lang.String propertyName)
Returns the
PropertyDescriptor for the specified property. |
java.util.Iterator |
getPropertyNames()
Returns an
Iterator over the property names of the object. |
java.lang.reflect.Method |
getWriteMethod(java.lang.String propertyName)
Returns a write (setter) method for a specific property.
|
boolean |
isIndexedProperty(java.lang.String propertyName)
Determines whether a property is an indexed property.
|
void |
setProperty(java.lang.Object object,
java.lang.String propertyName,
int index,
java.lang.Object propertyValue)
Sets a property on an object instance.
|
public static final int PUBLIC_CONSTANT_MODIFERS
protected ObjectIntrospector(java.lang.String typeName,
java.lang.ClassLoader classLoader)
throws java.lang.ClassNotFoundException
ObjectIntrospector for the specified
type.typeName - the object type nameclassLoader - the ClassLoader to use for introspectionjava.lang.ClassNotFoundExceptionpublic java.util.Set getConstantNames()
Set containing the constant names of the objectpublic java.lang.Object getConstantValue(java.lang.String constantName)
constantName - the name of the constant (unqualified)public java.util.Set getEventHandlerNames(java.lang.String eventSetName)
eventSetName - the name of the event set, e.g.,
'nextapp.echo.app.event.Action' for ActionEventsSet containing the names of event listener
methodspublic java.beans.EventSetDescriptor getEventSetDescriptor(java.lang.String eventSetName)
EventSetDescriptor for the specified event set.eventSetName - The name of the event set.EventSetDescriptor associated with the event setpublic java.util.Set getEventSetNames()
Set containing the event set names of the objectpublic java.lang.Class getObjectClass()
Class of the object being introspected.Classpublic java.lang.Class getPropertyClass(java.lang.String propertyName)
Class of a specific property.propertyName - the name of the propertyClass of the propertypublic int getPropertyCount()
Object.public java.lang.String getPropertyDefinitionConcreteType(java.lang.String propertyName)
propertyName - the name of the propertypublic java.lang.String getPropertyDefinitionType(java.lang.String propertyName)
propertyName - the name of the propertypublic java.beans.PropertyDescriptor getPropertyDescriptor(java.lang.String propertyName)
PropertyDescriptor for the specified property.propertyName - The name of the property.PropertyDescriptor associated with the propertypublic java.util.Iterator getPropertyNames()
Iterator over the property names of the object.Iterator over the property names of the objectpublic java.lang.reflect.Method getWriteMethod(java.lang.String propertyName)
propertyName - the name of the propertypublic boolean isIndexedProperty(java.lang.String propertyName)
propertyName - the name of the property to querypublic void setProperty(java.lang.Object object,
java.lang.String propertyName,
int index,
java.lang.Object propertyValue)
throws java.lang.IllegalArgumentException,
java.lang.IllegalAccessException,
java.lang.reflect.InvocationTargetException
object - the object to modifypropertyName - the property name to be setpropertyValue - the new property valuejava.lang.IllegalArgumentExceptionjava.lang.IllegalAccessExceptionjava.lang.reflect.InvocationTargetException