net.silentlycrashing.util
Class RegisteredAction

java.lang.Object
  extended by net.silentlycrashing.util.RegisteredAction

public class RegisteredAction
extends Object

An action that can be saved and then invoked by the code.


Field Summary
(package private)  Method registeredMethod
           
(package private)  Object registeredObject
           
 
Constructor Summary
RegisteredAction(String name, Object o)
          Builds a RegisteredAction without Method arguments.
RegisteredAction(String name, Object o, Class[] cargs)
          Builds a RegisteredAction with Method arguments.
 
Method Summary
 void invoke()
          Invokes the RegisteredAction without arguments.
 void invoke(Object[] oargs)
          Invokes the RegisteredAction with arguments.
 void link(Object o, Method m)
          Links the passed Object and Method to this RegisteredAction.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

registeredObject

Object registeredObject

registeredMethod

Method registeredMethod
Constructor Detail

RegisteredAction

public RegisteredAction(String name,
                        Object o)
Builds a RegisteredAction without Method arguments.

Parameters:
name - the name of the method to register
o - the Object holding the method

RegisteredAction

public RegisteredAction(String name,
                        Object o,
                        Class[] cargs)
Builds a RegisteredAction with Method arguments.

Parameters:
name - the name of the method to register
o - the Object holding the method
cargs - the arguments
Method Detail

link

public void link(Object o,
                 Method m)
Links the passed Object and Method to this RegisteredAction.

Parameters:
o - the Object to link
m - the Method to link

invoke

public void invoke()
Invokes the RegisteredAction without arguments.


invoke

public void invoke(Object[] oargs)
Invokes the RegisteredAction with arguments.

Parameters:
oargs - the arguments as an Object array