org.apache.commons.jexl.util
Class AbstractExecutor

java.lang.Object
  extended by org.apache.commons.jexl.util.AbstractExecutor
Direct Known Subclasses:
GetExecutor, PropertyExecutor

public abstract class AbstractExecutor
extends java.lang.Object

Abstract class that is used to execute an arbitrary method that is in introspected. This is the superclass for the GetExecutor and PropertyExecutor.

Since:
1.0
Version:
$Id: AbstractExecutor.java 398171 2006-04-29 14:57:29Z dion $
Author:
Jason van Zyl, Geir Magnusson Jr.

Field Summary
protected  java.lang.reflect.Method method
          Method to be executed.
protected  org.apache.commons.logging.Log rlog
          The executor instance log.
 
Constructor Summary
AbstractExecutor()
           
 
Method Summary
abstract  java.lang.Object execute(java.lang.Object o)
          Execute method against context.
 java.lang.reflect.Method getMethod()
          Get the method to be executed.
 boolean isAlive()
          Tell whether the executor is alive by looking at the value of the method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rlog

protected org.apache.commons.logging.Log rlog
The executor instance log.


method

protected java.lang.reflect.Method method
Method to be executed.

Constructor Detail

AbstractExecutor

public AbstractExecutor()
Method Detail

execute

public abstract java.lang.Object execute(java.lang.Object o)
                                  throws java.lang.IllegalAccessException,
                                         java.lang.reflect.InvocationTargetException
Execute method against context.

Parameters:
o - The owner.
Returns:
The return value.
Throws:
java.lang.IllegalAccessException - Method is inaccessible.
java.lang.reflect.InvocationTargetException - Method body throws an exception.

isAlive

public boolean isAlive()
Tell whether the executor is alive by looking at the value of the method.

Returns:
boolean Whether the executor is alive.

getMethod

public java.lang.reflect.Method getMethod()
Get the method to be executed.

Returns:
Method The method to be executed.