jcaas.util
Class DeferredInvoker

java.lang.Object
  extended by jcaas.util.DeferredInvoker
All Implemented Interfaces:
java.lang.Runnable

public class DeferredInvoker
extends java.lang.Object
implements java.lang.Runnable

This is a Runnable class that will invoke one instance of one method on an object. This is used to get around Swing thread restrictions.

Author:
steppm

Constructor Summary
DeferredInvoker(java.lang.Object _target, java.lang.String _methodname, java.lang.Class[] _types, java.lang.Object[] _values)
          Constructor.
 
Method Summary
 void run()
          This does the actual method call, using reflection.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeferredInvoker

public DeferredInvoker(java.lang.Object _target,
                       java.lang.String _methodname,
                       java.lang.Class[] _types,
                       java.lang.Object[] _values)
Constructor. This takes an object target, and methodname, and list of class types, and a list of actual values, and makes the method call using reflection.

Parameters:
_target - the target object of the method call
_methodname - the string name of the method (i.e. "setSize")
_types - a list of the types of parameter this method takes
_values - the list of actual values for the parameters, with primitives wrapped in wrapper classes
Method Detail

run

public void run()
This does the actual method call, using reflection. All errors are supressed.

Specified by:
run in interface java.lang.Runnable