RePast
v. 2.0

uchicago.src.reflector
Class Introspector

java.lang.Object
  |
  +--uchicago.src.reflector.Introspector

public class Introspector
extends Object


Field Summary
static int GET
           
static int SET
           
 
Constructor Summary
Introspector()
           
 
Method Summary
 Method getAccessorMethod(String propName, int type)
           
 String getPropertiesValues()
          Returns a String of "property: value" for all the properties.
 String getPropertyAsString(String propertyName)
           
 Iterator getPropertyNames()
           
 Object getPropertyValue(String propertyName)
           
 Hashtable getPropValues()
          Get the property value pairs as a Hashtable.
 boolean hasProperty(String propName)
           
 void introspect(Object o, String[] props)
           
 void invokeSetMethod(String propertyName, Object param)
           
 boolean isPropertyBoolean(String propertyName)
          Is the specified property boolean.
 boolean isPropertyStringable(String propertyName)
          Is the specified property amenable to being turned into a String - i.e.
 boolean isReadOnly(String propertyName)
           
 boolean isWriteOnly(String propertyName)
           
 void printProperties()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GET

public static final int GET
See Also:
Constant Field Values

SET

public static final int SET
See Also:
Constant Field Values
Constructor Detail

Introspector

public Introspector()
Method Detail

introspect

public void introspect(Object o,
                       String[] props)
                throws IntrospectionException
IntrospectionException

getAccessorMethod

public Method getAccessorMethod(String propName,
                                int type)

printProperties

public void printProperties()

getPropertyNames

public Iterator getPropertyNames()

getPropertyValue

public Object getPropertyValue(String propertyName)
                        throws InvocationTargetException,
                               IllegalAccessException
InvocationTargetException
IllegalAccessException

isPropertyStringable

public boolean isPropertyStringable(String propertyName)
                             throws InvocationTargetException,
                                    IllegalAccessException
Is the specified property amenable to being turned into a String - i.e. is it a String or a wrapper around a primitive.

InvocationTargetException
IllegalAccessException

isPropertyBoolean

public boolean isPropertyBoolean(String propertyName)
                          throws InvocationTargetException,
                                 IllegalAccessException
Is the specified property boolean.

InvocationTargetException
IllegalAccessException

getPropertyAsString

public String getPropertyAsString(String propertyName)
                           throws InvocationTargetException,
                                  IllegalAccessException
InvocationTargetException
IllegalAccessException

hasProperty

public boolean hasProperty(String propName)

getPropertiesValues

public String getPropertiesValues()
                           throws InvocationTargetException,
                                  IllegalAccessException
Returns a String of "property: value" for all the properties.

InvocationTargetException
IllegalAccessException

getPropValues

public Hashtable getPropValues()
                        throws InvocationTargetException,
                               IllegalAccessException
Get the property value pairs as a Hashtable. The key is the property as a String and the value is the value.

InvocationTargetException
IllegalAccessException

invokeSetMethod

public void invokeSetMethod(String propertyName,
                            Object param)
                     throws InvocationTargetException,
                            IllegalAccessException
InvocationTargetException
IllegalAccessException

isReadOnly

public boolean isReadOnly(String propertyName)

isWriteOnly

public boolean isWriteOnly(String propertyName)

RePast
v. 2.0

Bug reports and feature requests to RePast