|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.axis.utils.BeanPropertyDescriptor
This class represents a field/property in a value type (a class with either bean-style getters/setters or public fields).
It is essentially a thin wrapper around the PropertyDescriptor from the JavaBean utilities. We wrap it with this class so that we can create the subclass FieldPropertyDescriptor and access public fields (who wouldn't have PropertyDescriptors normally) via the same interface. There are also some interesting tricks where indexed properties are concerned, mostly involving the fact that we manage the arrays here rather than relying on the value type class to do it itself.
Field Summary | |
protected PropertyDescriptor |
myPD
|
protected static Object[] |
noArgs
|
Constructor Summary | |
protected |
BeanPropertyDescriptor()
Protected constructor for use by our children |
|
BeanPropertyDescriptor(PropertyDescriptor pd)
Constructor (takes a PropertyDescriptor) |
Method Summary | |
Object |
get(Object obj)
Get the property value |
Object |
get(Object obj,
int i)
Get an indexed property |
String |
getName()
Get our property name. |
Class |
getType()
Get the type of a property |
protected void |
growArrayToSize(Object obj,
Class componentType,
int i)
Grow the array |
boolean |
isIndexed()
Query if property is indexed. |
boolean |
isReadable()
Query if property is readable |
boolean |
isWriteable()
Query if property is writeable |
void |
set(Object obj,
int i,
Object newValue)
Set an indexed property value |
void |
set(Object obj,
Object newValue)
Set the property value |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected PropertyDescriptor myPD
protected static final Object[] noArgs
Constructor Detail |
public BeanPropertyDescriptor(PropertyDescriptor pd)
pd
- protected BeanPropertyDescriptor()
Method Detail |
public String getName()
public boolean isReadable()
public boolean isWriteable()
public boolean isIndexed()
public Object get(Object obj) throws InvocationTargetException, IllegalAccessException
obj
- is the object
InvocationTargetException
IllegalAccessException
public void set(Object obj, Object newValue) throws InvocationTargetException, IllegalAccessException
obj
- is the objectnewValue
- is the new value
InvocationTargetException
IllegalAccessException
public Object get(Object obj, int i) throws InvocationTargetException, IllegalAccessException
obj
- is the objecti
- the index
InvocationTargetException
IllegalAccessException
public void set(Object obj, int i, Object newValue) throws InvocationTargetException, IllegalAccessException
obj
- is the objecti
- the indexnewValue
- is the new value
InvocationTargetException
IllegalAccessException
protected void growArrayToSize(Object obj, Class componentType, int i) throws InvocationTargetException, IllegalAccessException
obj
- componentType
- i
-
InvocationTargetException
IllegalAccessException
public Class getType()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |