org.apache.axis.utils
Class BeanPropertyDescriptor

java.lang.Object
  |
  +--org.apache.axis.utils.BeanPropertyDescriptor

public class BeanPropertyDescriptor
extends java.lang.Object

This class is essentially a copy of the PropertyDescriptor information, except that the values in it can be modified. Updated this to include fields that don't have getter/setters.

Author:
Rich Scheuerle

Field Summary
protected static org.apache.commons.logging.Log log
           
 
Constructor Summary
BeanPropertyDescriptor(java.lang.String _name, java.lang.reflect.Field _field)
          Construct a BPD with a field Both must be set
BeanPropertyDescriptor(java.lang.String _name, java.lang.reflect.Method _getter, java.lang.reflect.Method _setter)
          Construct a BPD with getter/setter methods Both must be set
 
Method Summary
 java.lang.Object get(java.lang.Object obj)
          Get the property value
 java.lang.Object get(java.lang.Object obj, int i)
          Get an indexed property
 java.lang.String getName()
          Get the name of a property
 java.lang.Class getType()
          Get the type of a property
 boolean isIndexed()
          Query if property is indexed.
 boolean isReadable()
          Query if property is readable
 boolean isWriteable()
          Query if property is writeable
 void set(java.lang.Object obj, int i, java.lang.Object newValue)
          Get an indexed property value
 void set(java.lang.Object obj, java.lang.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

log

protected static org.apache.commons.logging.Log log
Constructor Detail

BeanPropertyDescriptor

public BeanPropertyDescriptor(java.lang.String _name,
                              java.lang.reflect.Method _getter,
                              java.lang.reflect.Method _setter)
Construct a BPD with getter/setter methods Both must be set

BeanPropertyDescriptor

public BeanPropertyDescriptor(java.lang.String _name,
                              java.lang.reflect.Field _field)
Construct a BPD with a field Both must be set
Method Detail

isReadable

public boolean isReadable()
Query if property is readable

isWriteable

public boolean isWriteable()
Query if property is writeable

isIndexed

public boolean isIndexed()
Query if property is indexed. Indexed properties require valid setters/getters

get

public java.lang.Object get(java.lang.Object obj)
                     throws java.lang.reflect.InvocationTargetException,
                            java.lang.IllegalAccessException
Get the property value

set

public void set(java.lang.Object obj,
                java.lang.Object newValue)
         throws java.lang.reflect.InvocationTargetException,
                java.lang.IllegalAccessException
Set the property value

get

public java.lang.Object get(java.lang.Object obj,
                            int i)
                     throws java.lang.reflect.InvocationTargetException,
                            java.lang.IllegalAccessException
Get an indexed property

set

public void set(java.lang.Object obj,
                int i,
                java.lang.Object newValue)
         throws java.lang.reflect.InvocationTargetException,
                java.lang.IllegalAccessException
Get an indexed property value

getName

public java.lang.String getName()
Get the name of a property

getType

public java.lang.Class getType()
Get the type of a property


Copyright © 2001 Apache XML Project. All Rights Reserved.