org.hawk.module.script
Class WhileLoopScript

java.lang.Object
  extended by org.hawk.module.script.AbstractScript
      extended by org.hawk.module.script.MultiLineScript
          extended by org.hawk.module.script.WhileLoopScript
All Implemented Interfaces:
IScript

public class WhileLoopScript
extends MultiLineScript


Field Summary
 
Fields inherited from class org.hawk.module.script.MultiLineScript
defaultMultiLineScript, functionScript, innerScripts, localStructStack, localVariableTableStack, multiLineContainer
 
Fields inherited from class org.hawk.module.script.AbstractScript
outerMultiLineScript
 
Constructor Summary
WhileLoopScript()
           
 
Method Summary
static int createScript(MultiLineScript multiLineScript, int i)
          This returns EchoScript from echo matcher map.
 Variable execute()
          This executes the contents of a script.
 java.lang.String getBoundaryCheckExp()
           
 java.lang.String getBoundaryCheckExpOrig()
           
 boolean isVariable()
           
 java.lang.String popBoundaryCheckExp()
           
 void popForLoopData()
           
 java.util.Map<java.lang.String,IDataType> popLocalVars()
          Default implementation for IScript.popLocalVars()
 void pushBoundaryCheckExp()
           
 void pushForLoopData()
           
 void pushLocalVars()
          Default implementation for IScript.pushLocalVars()
 void setBoundaryCheckExp(java.lang.String boundaryCheckExp)
           
 void setBoundaryCheckExpOrig(java.lang.String boundaryCheckExpOrig)
           
 java.lang.String toString()
           
 
Methods inherited from class org.hawk.module.script.MultiLineScript
addScript, addScripts, copy, extractMultiLineContainer, findArrayType, findNearestOuterMLScript, getFunctionScript, getInnerScripts, getLocalValue, getLocalValue, getMultiLineContainer, getStructVariable, getVariable, getVariableValue, isDefaultMultiLineScript, isInside, isInside, isLocalVarDeclared, parseMultiLines, setDefaultMultiLineScript, setFunctionScript, setInnerScripts, setLocalValue, setMultiLineContainer, setVariable, setVariableValue, toUI, unsetAllLocalValue, unsetLocalValue
 
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, refer, setLastScript, setLineNumber, setOuterMultiLineScript, subtract, toJava, toJavaMap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WhileLoopScript

public WhileLoopScript()
Method Detail

getBoundaryCheckExpOrig

public java.lang.String getBoundaryCheckExpOrig()

setBoundaryCheckExpOrig

public void setBoundaryCheckExpOrig(java.lang.String boundaryCheckExpOrig)

getBoundaryCheckExp

public java.lang.String getBoundaryCheckExp()

setBoundaryCheckExp

public void setBoundaryCheckExp(java.lang.String boundaryCheckExp)

pushBoundaryCheckExp

public void pushBoundaryCheckExp()

popBoundaryCheckExp

public java.lang.String popBoundaryCheckExp()

pushForLoopData

public void pushForLoopData()

popForLoopData

public void popForLoopData()

pushLocalVars

public void pushLocalVars()
Description copied from class: AbstractScript
Default implementation for IScript.pushLocalVars()

Specified by:
pushLocalVars in interface IScript
Overrides:
pushLocalVars in class MultiLineScript

popLocalVars

public java.util.Map<java.lang.String,IDataType> popLocalVars()
Description copied from class: AbstractScript
Default implementation for IScript.popLocalVars()

Specified by:
popLocalVars in interface IScript
Overrides:
popLocalVars in class MultiLineScript
Returns:
a map containing local var and its value.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

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 MultiLineScript
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

isVariable

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

createScript

public static int createScript(MultiLineScript multiLineScript,
                               int i)
                        throws HawkException
This returns EchoScript from echo matcher map.

Parameters:
lineEchoMatcherMap -
Returns:
Throws:
HawkException