| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This class provides dynamic access to methods of classes which may not be available at compile time & run time.
Inner Class Summary | |
public static class | DynamicClass.CollectionHint Hint for a collection type - details Classes than it can contain |
public static class | DynamicClass.ConstrainedSelectionHint Hint for a property that should take only a constrained set of values |
public static class | DynamicClass.ImmutableHint Hint that a CLASS is immutable (i.e. |
public static class | DynamicClass.PossibleSelectionHint Hint for a property that COULD take a predefined set of values, or something else of the specified type |
public static class | DynamicClass.Property Class to represent a property type |
public static class | DynamicClass.PropertyHint Umbrella class PropertyHint that all property-hint types extend |
Field Summary | |
final static String | GET_HINTS_METHOD Indicates name of method to invoke in order to get hints for a particular property |
Constructor Summary | |
DynamicClass(String class_name, Class[] params, Object[] args) Creates an instance of the given class, using the constructor with the given arguments. | |
DynamicClass(String class_name) Creates an instance of the given class, using the default constructor. | |
DynamicClass(Object obj) Creates a DynamicClass to wrap the given Object |
Method Summary | |
static Object | createInstance(String class_name) Instantiate an instance of a particular class |
static Object | createInstance(String class_name, Class[] param_types, Object[] params) Instatiates a class, using a constructor with the given parameters |
Object | duplicate() Attempt to duplicate the object this DynamicClass wrapps using the following mechanisms in the given order: Object.clone() Serialization |
PropertyHint | getHint(String property) Get the hint (if available) for the given property - returns null if no hint available |
Object | getObject() |
List | getProperties() Gets the properties for this object (i.e. |
Object | invoke(String method, Class[] params, Object[] args) Invokes a method on the wrapper object with the given arguments |
Object | invoke(String method) Invokes a method on the wrapper object without any arguments |
static Object | invokeStatic(String class_name, String method, Class[] params, Object[] args) Invokes a method on the given object with the given arguments |
static Object | invokeStatic(String class_name, String method) Invokes a method on the given object with no arguments |
static void | main(String[] args) |
String | toString() |
Field Detail |
public final static String GET_HINTS_METHOD
Constructor Detail |
public DynamicClass(String class_name, Class[] params, Object[] args)
throws java.lang.ClassNotFoundException,
java.lang.NoSuchMethodException,
java.lang.InstantiationException,
DynamicClassException
public DynamicClass(String class_name)
throws java.lang.ClassNotFoundException,
java.lang.NoSuchMethodException,
java.lang.InstantiationException,
DynamicClassException
public DynamicClass(Object obj)
Method Detail |
public static Object createInstance(String class_name)
public static Object createInstance(String class_name, Class[] param_types, Object[] params)
public Object duplicate()
public PropertyHint getHint(String property)
public Object getObject()
public List getProperties()
The List returned contains Property instances, or null if the Object is immutable
public Object invoke(String method, Class[] params, Object[] args)
throws DynamicClassException,
java.lang.NoSuchMethodException
public Object invoke(String method)
throws DynamicClassException,
java.lang.NoSuchMethodException
public static Object invokeStatic(String class_name, String method, Class[] params, Object[] args)
throws DynamicClassException,
java.lang.NoSuchMethodException,
java.lang.ClassNotFoundException
public static Object invokeStatic(String class_name, String method)
throws DynamicClassException,
java.lang.NoSuchMethodException,
java.lang.ClassNotFoundException
public static void main(String[] args)
throws java.lang.Throwable
public String toString()
Association Links |
to Class java.lang.Object
to Class java.lang.Class
| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |