org.hawk.module.script
Class AssignmentScript

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

public class AssignmentScript
extends SingleLineScript


Field Summary
 
Fields inherited from class org.hawk.module.script.AbstractScript
outerMultiLineScript
 
Constructor Summary
AssignmentScript()
           
 
Method Summary
 AssignmentScript copy()
           
static AssignmentScript createScript(java.util.Map<java.lang.Integer,java.lang.String> lineStructMatcherMap)
           
 Variable execute()
          This executes the contents of a script.
 java.lang.String getExpression()
           
static java.util.regex.Pattern getPattern()
           
 boolean isVariable()
           
 void setExpression(java.lang.String expression)
           
 java.lang.String toString()
           
 
Methods inherited from class org.hawk.module.script.SingleLineScript
addScripts, 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, wait, wait, wait
 

Constructor Detail

AssignmentScript

public AssignmentScript()
Method Detail

getExpression

public java.lang.String getExpression()

setExpression

public void setExpression(java.lang.String expression)

getPattern

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

createScript

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

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

isVariable

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

copy

public AssignmentScript copy()
Specified by:
copy in interface IScript
Overrides:
copy in class SingleLineScript