org.hawk.module.script
Class SingleLineScript

java.lang.Object
  extended by org.hawk.module.script.AbstractScript
      extended by org.hawk.module.script.SingleLineScript
All Implemented Interfaces:
IScript
Direct Known Subclasses:
AliasScript, ArrayDeclScript, AssignmentScript, BreakScript, CommentScript, EchoScript, ExecFunctionScript, ExecModuleScript, ParameterScript, ReadLineScript, ReturnScript, StructureScript, ThinkScript, VariableDeclScript

public class SingleLineScript
extends AbstractScript


Field Summary
 
Fields inherited from class org.hawk.module.script.AbstractScript
outerMultiLineScript
 
Constructor Summary
SingleLineScript()
           
 
Method Summary
static boolean addScripts(int i, java.lang.String scriptStr, MultiLineScript multiLineScript)
           
 IScript copy()
           
 Variable execute()
          This executes the contents of a script.
protected  MultiLineScript findNearestOuterMLScript()
           
 Variable getVariable()
           
 Variable getVariableValue()
           
 boolean isVariable()
           
 void setVariable(Variable value)
           
 void setVariableValue(Variable value)
           
 java.lang.String 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

SingleLineScript

public SingleLineScript()
Method Detail

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
Specified by:
execute in class AbstractScript
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

addScripts

public static boolean addScripts(int i,
                                 java.lang.String scriptStr,
                                 MultiLineScript multiLineScript)
                          throws HawkException
Throws:
HawkException

isVariable

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

getVariable

public Variable getVariable()

setVariableValue

public void setVariableValue(Variable value)

getVariableValue

public Variable getVariableValue()

setVariable

public void setVariable(Variable value)

copy

public IScript copy()

findNearestOuterMLScript

protected MultiLineScript findNearestOuterMLScript()
Specified by:
findNearestOuterMLScript in class AbstractScript

toUI

public java.lang.String toUI()
Specified by:
toUI in interface IScript
Specified by:
toUI in class AbstractScript