org.finra.jtaf.core.model.invocationtarget
Class Function

java.lang.Object
  extended by org.finra.jtaf.core.model.invocationtarget.InvocationTarget
      extended by org.finra.jtaf.core.model.invocationtarget.Function

public final class Function
extends InvocationTarget

This allows for a collection of commands to be defined and easily called in the test script.


Field Summary
 
Fields inherited from class org.finra.jtaf.core.model.invocationtarget.InvocationTarget
globalContext
 
Constructor Summary
Function(String name)
          This called when instantiating the function before it is executed by the interpreter.
 
Method Summary
 void acceptInvocationTargetVisitor(Interpreter v)
          This is used by the interpreter to either execute the command or the function.
 InvocationList getBody()
          Get the invocations that make up this function.
 void setBody(InvocationList invocations)
          Set the body of this function.
 
Methods inherited from class org.finra.jtaf.core.model.invocationtarget.InvocationTarget
addOptionalParameter, addProduction, addRequiredParameter, cleanGlobalContext, getAllParameters, getFromGlobalContext, getGlobalContext, getName, getOptionalParameters, getProductions, getRequiredParameters, getUsage, putToGlobalContext, setGlobalContext, setUsage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Function

public Function(String name)
         throws NameFormatException
This called when instantiating the function before it is executed by the interpreter.

Parameters:
name - - name of the function
Throws:
NameFormatException
Method Detail

getBody

public final InvocationList getBody()
Get the invocations that make up this function.

Returns:
The InvocationList associated with this function

setBody

public final void setBody(InvocationList invocations)
Set the body of this function.

Parameters:
invocations - - the invocation list that will be used as the function body.

acceptInvocationTargetVisitor

public void acceptInvocationTargetVisitor(Interpreter v)
                                   throws Throwable
Description copied from class: InvocationTarget
This is used by the interpreter to either execute the command or the function.

Specified by:
acceptInvocationTargetVisitor in class InvocationTarget
Parameters:
v - - the interpreter used that is executing the function.
Throws:
- - an exception thrown by the execution of the function
Throwable


Copyright © 2014. All rights reserved.