com.partnersoft.v3x.gadgets
Class Trigger

java.lang.Object
  extended by com.partnersoft.v3x.gadgets.Trigger
All Implemented Interfaces:
java.io.Serializable

public class Trigger
extends java.lang.Object
implements java.io.Serializable

An trigger is an object that, when pulled, calls a single, parameterless method on another object.

See Also:
Serialized Form

Constructor Summary
Trigger()
          Create an empty Trigger.
Trigger(java.lang.Object victim, java.lang.String methodName)
          Create a Trigger which calls the named method on the given object.
 
Method Summary
 java.lang.String getMethodName()
          Gets the method name.
 java.lang.Object getVictim()
          Gets the object the method is called on.
 void pull()
          Pull the trigger.
 void setMethodName(java.lang.String newName)
          Sets the method name.
 void setVictim(java.lang.Object newVictim)
          Sets the object the method is called on.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Trigger

public Trigger()
Create an empty Trigger.


Trigger

public Trigger(java.lang.Object victim,
               java.lang.String methodName)
Create a Trigger which calls the named method on the given object.

Method Detail

pull

public void pull()
          throws java.lang.NoSuchMethodException
Pull the trigger.

Throws:
java.lang.NoSuchMethodException

getMethodName

public java.lang.String getMethodName()
Gets the method name.


setMethodName

public void setMethodName(java.lang.String newName)
Sets the method name.


getVictim

public java.lang.Object getVictim()
Gets the object the method is called on.


setVictim

public void setVictim(java.lang.Object newVictim)
Sets the object the method is called on.