org.yasl.xmlobjects.impl
Class MethodCallImpl

java.lang.Object
  extended byorg.yasl.xmlobjects.impl.BaseComponent
      extended byorg.yasl.xmlobjects.impl.MethodCallImpl
All Implemented Interfaces:
ArgAccumulator, KeyedObject, KeyTypeAccessor, MethodCall

public class MethodCallImpl
extends BaseComponent
implements ArgAccumulator, KeyedObject, MethodCall

Version:
1.0
Author:
Jeff Chapman

Constructor Summary
MethodCallImpl(String key, String keyType, String methodName)
           
MethodCallImpl(String key, String keyType, String methodName, String returnedObjClassName)
           
 
Method Summary
 Object callMethod(Object targetObject)
          Executes a method call on the targetObject using reflection with the method name and the accumulated arguments to identify the method.
 String getReturnedObjectClass()
          Returns the class type for the object returned from callmethod.
 
Methods inherited from class org.yasl.xmlobjects.impl.BaseComponent
addArgument, findMatchingClass, getArgClasses, getArgObjects, getArgumentClasses, getClassName, getConstructor, getKey, getKeyType, getMethod, getObjectInfo, setObjectInfo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.yasl.xmlobjects.ArgAccumulator
addArgument
 
Methods inherited from interface org.yasl.xmlobjects.KeyedObject
getKey
 
Methods inherited from interface org.yasl.xmlobjects.KeyTypeAccessor
getKeyType
 

Constructor Detail

MethodCallImpl

public MethodCallImpl(String key,
                      String keyType,
                      String methodName)

MethodCallImpl

public MethodCallImpl(String key,
                      String keyType,
                      String methodName,
                      String returnedObjClassName)
Method Detail

callMethod

public Object callMethod(Object targetObject)
                  throws MethodCallException
Description copied from interface: MethodCall
Executes a method call on the targetObject using reflection with the method name and the accumulated arguments to identify the method.

Specified by:
callMethod in interface MethodCall
Parameters:
targetObject - Object
Returns:
Object
Throws:
MethodCallException

getReturnedObjectClass

public String getReturnedObjectClass()
Description copied from interface: MethodCall
Returns the class type for the object returned from callmethod.

If no object is returned, this method will return null.

Specified by:
getReturnedObjectClass in interface MethodCall
Returns:
String