org.hawk.module.script
Class ExecFunctionScript

java.lang.Object
  extended by org.hawk.module.script.AbstractScript
      extended by org.hawk.module.script.SingleLineScript
          extended by org.hawk.module.script.ExecFunctionScript
All Implemented Interfaces:
IScript
Direct Known Subclasses:
ExecBackgroundSingleLineScript, ExecParallelSingleLineScript

public class ExecFunctionScript
extends SingleLineScript


Field Summary
 
Fields inherited from class org.hawk.module.script.AbstractScript
outerMultiLineScript
 
Constructor Summary
ExecFunctionScript()
           
 
Method Summary
 java.util.Map<java.lang.Integer,IScript> cloneParamMap()
           
static ExecFunctionScript createScript(java.util.Map<java.lang.Integer,java.lang.String> lineFunctionMatcherMap)
           
 Variable execute()
          This executes the contents of a script.
static Variable execute(java.lang.String functionName, int lineNumber, java.lang.String mangledFunctionName, java.util.Map<java.lang.Integer,IScript> paramMap)
           
 java.lang.String getFunctionName()
           
 java.util.Map<java.lang.Integer,IScript> getParamMap()
           
 java.lang.String getParams()
           
static java.util.regex.Pattern getPattern()
          ExecFunctionScript pattern.
 boolean isVariable()
           
protected  java.lang.String parseFunctionParameters()
           
 void setFunctionName(java.lang.String functionName)
           
 void setParamMap(java.util.Map<java.lang.Integer,IScript> paramMap)
           
 void setParams(java.lang.String params)
           
 
Methods inherited from class org.hawk.module.script.SingleLineScript
addScripts, copy, findNearestOuterMLScript, getVariable, getVariableValue, setVariable, setVariableValue, toUI
 
Methods inherited from class org.hawk.module.script.AbstractScript
add, and, arrayBracket, assign, divide, equalTo, evaluateGlobalVariable, evaluateLocalBoolean, evaluateLocalVariable, getLineNumber, getOuterMultiLineScript, greaterThan, greaterThanEqualTo, isLastScript, lessThan, lessThanEqualTo, mangle, modulus, multiply, or, popLocalVars, pushLocalVars, refer, setLastScript, setLineNumber, setOuterMultiLineScript, subtract, toJava, toJavaMap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExecFunctionScript

public ExecFunctionScript()
Method Detail

getPattern

public static java.util.regex.Pattern getPattern()
ExecFunctionScript pattern.

Returns:
returns ExecFunctionScript
See Also:
ScriptPattern

createScript

public static ExecFunctionScript createScript(java.util.Map<java.lang.Integer,java.lang.String> lineFunctionMatcherMap)
                                       throws HawkException
Throws:
HawkException

parseFunctionParameters

protected java.lang.String parseFunctionParameters()
                                            throws HawkException
Throws:
HawkException

getParamMap

public java.util.Map<java.lang.Integer,IScript> getParamMap()

cloneParamMap

public java.util.Map<java.lang.Integer,IScript> cloneParamMap()

setParamMap

public void setParamMap(java.util.Map<java.lang.Integer,IScript> paramMap)

getParams

public java.lang.String getParams()

setParams

public void setParams(java.lang.String params)

getFunctionName

public java.lang.String getFunctionName()

setFunctionName

public void setFunctionName(java.lang.String functionName)

execute

public Variable execute()
                 throws HawkException
Description copied from interface: IScript
This executes the contents of a script. This returns either a boolean or double depending upon how a method is invoked.

Specified by:
execute in interface IScript
Overrides:
execute in class SingleLineScript
Returns:
the returned data is being used to test whether a function returns or not. Currently Hawk support two types return Double and Boolean.The implementation should look at the return type and script type to determine what action to be taken.
Throws:
HawkException

execute

public static Variable execute(java.lang.String functionName,
                               int lineNumber,
                               java.lang.String mangledFunctionName,
                               java.util.Map<java.lang.Integer,IScript> paramMap)
                        throws HawkException
Throws:
HawkException

isVariable

public boolean isVariable()
Specified by:
isVariable in interface IScript
Overrides:
isVariable in class SingleLineScript
Returns: