org.openqa.selenium.internal.seleniumemulation
Class VariableDeclaration

java.lang.Object
  extended by org.openqa.selenium.internal.seleniumemulation.VariableDeclaration
All Implemented Interfaces:
ScriptMutator

public class VariableDeclaration
extends Object
implements ScriptMutator

Prepend a variable declaration to a script.


Constructor Summary
VariableDeclaration(String raw, String declaration)
           
 
Method Summary
 void mutate(String script, StringBuilder outputTo)
          Mutate a script.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VariableDeclaration

public VariableDeclaration(String raw,
                           String declaration)
Method Detail

mutate

public void mutate(String script,
                   StringBuilder outputTo)
Description copied from interface: ScriptMutator
Mutate 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:
mutate in interface ScriptMutator
Parameters:
script - The original script.
outputTo - The mutated script.


Copyright © 2012. All Rights Reserved.