org.colos.ejs.library.control
Class MethodWithOneParameter

java.lang.Object
  extended by org.colos.ejs.library.control.MethodWithOneParameter

public class MethodWithOneParameter
extends java.lang.Object

A class to store and invoke methods using reflection.


Constructor Summary
MethodWithOneParameter(int _type, java.lang.Object _target, java.lang.String _name, java.lang.String _returnType, MethodWithOneParameter _secondMethod, java.lang.Object _anObject)
          Creates a new method from the input parameters.
 
Method Summary
 boolean equals(int _type, java.lang.Object _target, java.lang.String _name)
           
 Value invoke(int _type, java.lang.Object _callingObject)
           
static java.lang.reflect.Method resolveMethod(java.lang.Object _target, java.lang.String _name, java.lang.Class<?>[] _classList)
           
static java.lang.String[] splitMethodName(java.lang.String _inputName)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MethodWithOneParameter

public MethodWithOneParameter(int _type,
                              java.lang.Object _target,
                              java.lang.String _name,
                              java.lang.String _returnType,
                              MethodWithOneParameter _secondMethod,
                              java.lang.Object _anObject)
Creates a new method from the input parameters.

Parameters:
int - _type An integer type to help create families of actions
Object - _target The object that implements the method
String - _name The description of the method. 1.- If the method's parameter list is void, then you can specify either 'method()' or just 'method' 2.- If the method accepts a boolean, you can specify either 'method(true)' or 'method(false)' 3.- If the method accepts a double, you can specify something like 'method(1.0)' 4.- If the method accepts an integer, you can specify something like 'method(1)' 5.- If the method accepts a String, you can specify something like 'method("my string")' In all cases, the first version is the recommended one.
MethodWithOneParameter - _secondMethod A second action that will be invoked following this one. This is useful when you want to call more than one methods at once
_anObject - and object for the very special case of method("#CONTROL#"); //Added on Jan 31st 2004
Method Detail

invoke

public Value invoke(int _type,
                    java.lang.Object _callingObject)

equals

public boolean equals(int _type,
                      java.lang.Object _target,
                      java.lang.String _name)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

resolveMethod

public static java.lang.reflect.Method resolveMethod(java.lang.Object _target,
                                                     java.lang.String _name,
                                                     java.lang.Class<?>[] _classList)

splitMethodName

public static java.lang.String[] splitMethodName(java.lang.String _inputName)