org.finra.jtaf.core.model.invocationtarget
Class Function
java.lang.Object
org.finra.jtaf.core.model.invocationtarget.InvocationTarget
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.
Constructor Summary |
Function(String name)
This called when instantiating the function before it is executed by the
interpreter. |
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 |
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
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.