Package jp.vmi.selenium.selenese.mutator
Class FunctionDeclaration
java.lang.Object
jp.vmi.selenium.selenese.mutator.FunctionDeclaration
- All Implemented Interfaces:
ScriptMutator
public class FunctionDeclaration extends Object implements ScriptMutator
Models a function declaration. That is, it provides an implementation of a particular Javascript
function.
-
Constructor Summary
Constructors Constructor Description FunctionDeclaration(String raw, String result) -
Method Summary
Modifier and Type Method Description voidmutate(Context context, String script, StringBuilder outputTo)Mutate a script.
-
Constructor Details
-
FunctionDeclaration
- Parameters:
raw- The original function (eg: "selenium.isElementPresent")result- The body of the function implementation.
-
-
Method Details
-
mutate
Description copied from interface:ScriptMutatorMutate a script. The original, unmodified script is used to generate a script on the StringBuilder, the "toString" method of which should be used to get the result. We make use of a StringBuilder rather than a normal String so that we can efficiently chain mutators.- Specified by:
mutatein interfaceScriptMutator- Parameters:
context- SeleneseRunner context.script- The original script.outputTo- The mutated script.
-