org.globus.cog.gui.grapheditor.properties
Class Introspector

java.lang.Object
  extended byorg.globus.cog.gui.grapheditor.properties.Introspector

public class Introspector
extends Object

An introspection helper. It includes support for user defined properties too, when it comes to graph components.


Constructor Summary
Introspector()
           
 
Method Summary
static boolean _isWritable(Object o, String property)
           
static List getCommonProperties(Collection objects)
           
static List getProperties(Object o)
          If the object is not a graph component, introspective properties will be automatically generated.
static Object getProperty(Object o, String pname)
          Gets a property value using introspection
static Class getPropertyClass(Class c, String name)
          determines the class of a property using instrospection.
static Class getPropertyClass(Object o, String name)
           
static List getPropertyHolderProperties(PropertyHolder o)
           
static String getPropertyName(String getterName)
           
static void setProperty(Object o, String pname, Object value, Class valueClass)
          sets a property using introspection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Introspector

public Introspector()
Method Detail

getProperties

public static List getProperties(Object o)
If the object is not a graph component, introspective properties will be automatically generated.

Parameters:
o -
Returns:
a list of properties for the object

getPropertyHolderProperties

public static List getPropertyHolderProperties(PropertyHolder o)

getPropertyName

public static String getPropertyName(String getterName)

_isWritable

public static boolean _isWritable(Object o,
                                  String property)

getCommonProperties

public static List getCommonProperties(Collection objects)
Parameters:
objects -
Returns:
a list of common properties for all the specified objects

getProperty

public static Object getProperty(Object o,
                                 String pname)
Gets a property value using introspection

Parameters:
o -
pname -
Returns:

setProperty

public static void setProperty(Object o,
                               String pname,
                               Object value,
                               Class valueClass)
sets a property using introspection

Parameters:
o -
pname -
value -
valueClass -

getPropertyClass

public static Class getPropertyClass(Object o,
                                     String name)

getPropertyClass

public static Class getPropertyClass(Class c,
                                     String name)
determines the class of a property using instrospection. It looks at the parameter the setter takes for that property

Parameters:
name -
Returns: