Arch4J 1.1

org.arch4j.util
Class Performer

java.lang.Object
  |
  +--org.arch4j.util.Performer

public class Performer
extends Object

This class wraps any given instance and allows you to execute a method through reflection. It will allow you to call different methods at runtime.


Constructor Summary
Performer(Object anObject)
          Create a new instance which wraps the object passed in.
 
Method Summary
static void example()
          An example of how to use the performer.
 Object getPropertyValue(String aPropertyName)
          Get the value of the bean property.
 Object perform(String methodName)
          This method was created by a SmartGuide.
 Object performWith(String methodName, Object arg1)
          This method was created by a SmartGuide.
 Object performWithAll(String methodName, Object[] arguments)
          Perform the method defined by the method name using the arguments.
 Class returnTypeFor(String theMethod)
          This method was created by a SmartGuide.
 void setObject(Object anObject)
          This method was created by a SmartGuide.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Performer

public Performer(Object anObject)
Create a new instance which wraps the object passed in.

Parameters:
anObject - The object to wrap.
Method Detail

example

public static void example()
An example of how to use the performer.


getPropertyValue

public Object getPropertyValue(String aPropertyName)
Get the value of the bean property.


perform

public Object perform(String methodName)
This method was created by a SmartGuide.

Parameters:
methodName - java.lang.String
Returns:
java.lang.Object

performWith

public Object performWith(String methodName,
                          Object arg1)
This method was created by a SmartGuide.

Parameters:
methodName - java.lang.String
arg1 - java.lang.Object
Returns:
java.lang.Object

performWithAll

public Object performWithAll(String methodName,
                             Object[] arguments)
Perform the method defined by the method name using the arguments.

Parameters:
methodName - The name of the method to perform.
arguments - The arguments to use in the method call.
Returns:
The return value from the method.

returnTypeFor

public Class returnTypeFor(String theMethod)
This method was created by a SmartGuide.

Parameters:
theMethod - java.lang.String
Returns:
java.lang.Class

setObject

public void setObject(Object anObject)
This method was created by a SmartGuide.

Parameters:
anObject - java.lang.Object

Arch4J 1.1

Copyright © 2000-2004 SpiderLogic, a service of Wipfli Ullrich Bertelson LLP.