org.eclipse.actf.validation.core
Class ResultInvoker

java.lang.Object
  extended by org.eclipse.actf.validation.core.ResultInvoker
All Implemented Interfaces:
Runnable

public class ResultInvoker
extends Object
implements Runnable

The ResultInvoker is used in conjunction with the IGuiModel interface in order to insure that all object instantiations and/or method invocations effecting or depending upon the state of components in GUI occur on the UI thread appropriate for the model. The primary task of this class is to wrap the call to invoke on the Reflector.Result specified in the constructor.

Author:
Mike Squillace
See Also:
IGuiModel.invokeOnUIThread(Runnable)

Constructor Summary
ResultInvoker(Reflector.Result result)
          create an invoker for the specified result
ResultInvoker(Reflector.Result result, Object receiver, IGuiModel model)
          create an invoker for the specified result which will use the given receiver as the receiver for the method call being invoked reflectively
 
Method Summary
 Object getReturnValue()
          return the return value from a method invokation or object instantiated by a constructor via the invoke method
 Throwable getThrowable()
          returns the Throwable object should an exception have occured during invokation of invoke method
 void run()
          simply wraps the invocation of the invoke method of the result object specified at instantiation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResultInvoker

public ResultInvoker(Reflector.Result result)
create an invoker for the specified result

Parameters:
result - - reflector result to be invoked

ResultInvoker

public ResultInvoker(Reflector.Result result,
                     Object receiver,
                     IGuiModel model)
create an invoker for the specified result which will use the given receiver as the receiver for the method call being invoked reflectively

Parameters:
result - - reflector result to be invoked
receiver - - receiver for method invokation or null for constructor or static method invokation
model - - IGuiModel instance to which this applies
Method Detail

run

public void run()
simply wraps the invocation of the invoke method of the result object specified at instantiation

Specified by:
run in interface Runnable
See Also:
Reflector.Result.invoke(Object)

getThrowable

public Throwable getThrowable()
returns the Throwable object should an exception have occured during invokation of invoke method

Returns:
throwable or null if no exception occured

getReturnValue

public Object getReturnValue()
return the return value from a method invokation or object instantiated by a constructor via the invoke method

Returns:
return value from method or newly created object