Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.meterware.httpunit.javascript
Class JavaScript.Option  view JavaScript.Option download JavaScript.Option.java

java.lang.Object
  extended byScriptableObject
      extended bycom.meterware.httpunit.javascript.JavaScript.JavaScriptEngine
          extended bycom.meterware.httpunit.javascript.JavaScript.Option
All Implemented Interfaces:
com.meterware.httpunit.scripting.ScriptingEngine
Enclosing class:
JavaScript

public static class JavaScript.Option
extends JavaScript.JavaScriptEngine


Field Summary
protected  JavaScript.JavaScriptEngine _parent
           
protected  com.meterware.httpunit.scripting.ScriptableDelegate _scriptable
           
 
Constructor Summary
JavaScript.Option()
           
 
Method Summary
 void clearCaches()
          Clears any cached values, permitting them to be recomputed as needed.
protected  void discardDocumentWriteBuffer()
           
 java.lang.String evaluateScriptExpression(java.lang.String urlString)
          Evaluates the specified string as JavaScript.
 java.lang.String executeScript(java.lang.String language, java.lang.String script)
          Interprets the specified script, which may include global function definitions.
 java.lang.Object get(int i, Scriptable scriptable)
           
 java.lang.Object get(java.lang.String propertyName, Scriptable scriptable)
           
 java.lang.String getClassName()
           
(package private)  com.meterware.httpunit.scripting.SelectionOption getDelegate()
           
protected  java.lang.StringBuffer getDocumentWriteBuffer()
           
(package private)  java.lang.String getID()
           
(package private)  java.lang.String getName()
           
 boolean has(java.lang.String propertyName, Scriptable scriptable)
           
(package private)  void initialize(JavaScript.JavaScriptEngine parent, com.meterware.httpunit.scripting.ScriptableDelegate scriptable)
           
 void jsConstructor(java.lang.String text, java.lang.String value, boolean defaultSelected, boolean selected)
           
 boolean jsGet_defaultSelected()
           
 int jsGet_index()
           
 boolean jsGet_selected()
           
 java.lang.String jsGet_text()
           
 java.lang.String jsGet_value()
           
 void jsSet_selected(boolean selected)
           
 void jsSet_text(java.lang.String text)
           
 void jsSet_value(java.lang.String value)
           
 com.meterware.httpunit.scripting.ScriptingEngine newScriptingEngine(com.meterware.httpunit.scripting.ScriptableDelegate child)
          Returns a new scripting engine for the specified delegate.
 boolean performEvent(java.lang.String eventScript)
          Interprets the specified script and returns a boolean result.
 void put(java.lang.String propertyName, Scriptable scriptable, java.lang.Object value)
           
 boolean supportsScriptLanguage(java.lang.String language)
          Returns true if this engine supports the specified script.
protected  JavaScript.ElementArray toElementArray(com.meterware.httpunit.scripting.ScriptableDelegate[] scriptables)
           
(package private)  java.lang.Object toScriptable(com.meterware.httpunit.scripting.ScriptableDelegate delegate)
          Converts a scriptable delegate obtained from a subobject into the appropriate Rhino-compatible Scriptable.
 java.lang.String toString()
          Convert this Object to a human-readable String.
protected static java.lang.String toStringIfNotUndefined(java.lang.Object object)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_scriptable

protected com.meterware.httpunit.scripting.ScriptableDelegate _scriptable

_parent

protected JavaScript.JavaScriptEngine _parent
Constructor Detail

JavaScript.Option

public JavaScript.Option()
Method Detail

getClassName

public java.lang.String getClassName()

jsConstructor

public void jsConstructor(java.lang.String text,
                          java.lang.String value,
                          boolean defaultSelected,
                          boolean selected)

jsGet_index

public int jsGet_index()

jsGet_text

public java.lang.String jsGet_text()

jsSet_text

public void jsSet_text(java.lang.String text)

jsGet_value

public java.lang.String jsGet_value()

jsSet_value

public void jsSet_value(java.lang.String value)

jsGet_selected

public boolean jsGet_selected()

jsSet_selected

public void jsSet_selected(boolean selected)

jsGet_defaultSelected

public boolean jsGet_defaultSelected()

getDelegate

com.meterware.httpunit.scripting.SelectionOption getDelegate()

supportsScriptLanguage

public boolean supportsScriptLanguage(java.lang.String language)
Description copied from interface: com.meterware.httpunit.scripting.ScriptingEngine
Returns true if this engine supports the specified script.

Specified by:
supportsScriptLanguage in interface com.meterware.httpunit.scripting.ScriptingEngine

executeScript

public java.lang.String executeScript(java.lang.String language,
                                      java.lang.String script)
Description copied from interface: com.meterware.httpunit.scripting.ScriptingEngine
Interprets the specified script, which may include global function definitions.

Specified by:
executeScript in interface com.meterware.httpunit.scripting.ScriptingEngine

getDocumentWriteBuffer

protected java.lang.StringBuffer getDocumentWriteBuffer()

discardDocumentWriteBuffer

protected void discardDocumentWriteBuffer()

performEvent

public boolean performEvent(java.lang.String eventScript)
Description copied from interface: com.meterware.httpunit.scripting.ScriptingEngine
Interprets the specified script and returns a boolean result.

Specified by:
performEvent in interface com.meterware.httpunit.scripting.ScriptingEngine

evaluateScriptExpression

public java.lang.String evaluateScriptExpression(java.lang.String urlString)
Evaluates the specified string as JavaScript. Will return null if the script has no return value.

Specified by:
evaluateScriptExpression in interface com.meterware.httpunit.scripting.ScriptingEngine

initialize

void initialize(JavaScript.JavaScriptEngine parent,
                com.meterware.httpunit.scripting.ScriptableDelegate scriptable)
          throws org.xml.sax.SAXException,
                 PropertyException,
                 JavaScriptException,
                 NotAFunctionException

getName

java.lang.String getName()

getID

java.lang.String getID()

has

public boolean has(java.lang.String propertyName,
                   Scriptable scriptable)

get

public java.lang.Object get(java.lang.String propertyName,
                            Scriptable scriptable)

get

public java.lang.Object get(int i,
                            Scriptable scriptable)

put

public void put(java.lang.String propertyName,
                Scriptable scriptable,
                java.lang.Object value)

toString

public java.lang.String toString()
Description copied from class: java.lang.Object
Convert this Object to a human-readable String. There are no limits placed on how long this String should be or what it should contain. We suggest you make it as intuitive as possible to be able to place it into System.out.println() 55 and such.

It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.

This method will be called when performing string concatenation with this object. If the result is null, string concatenation will instead use "null".

The default implementation returns getClass().getName() + "@" + Integer.toHexString(hashCode()).


newScriptingEngine

public com.meterware.httpunit.scripting.ScriptingEngine newScriptingEngine(com.meterware.httpunit.scripting.ScriptableDelegate child)
Description copied from interface: com.meterware.httpunit.scripting.ScriptingEngine
Returns a new scripting engine for the specified delegate.

Specified by:
newScriptingEngine in interface com.meterware.httpunit.scripting.ScriptingEngine

clearCaches

public void clearCaches()
Description copied from interface: com.meterware.httpunit.scripting.ScriptingEngine
Clears any cached values, permitting them to be recomputed as needed.

Specified by:
clearCaches in interface com.meterware.httpunit.scripting.ScriptingEngine

toStringIfNotUndefined

protected static java.lang.String toStringIfNotUndefined(java.lang.Object object)

toScriptable

final java.lang.Object toScriptable(com.meterware.httpunit.scripting.ScriptableDelegate delegate)
Converts a scriptable delegate obtained from a subobject into the appropriate Rhino-compatible Scriptable.


toElementArray

protected JavaScript.ElementArray toElementArray(com.meterware.httpunit.scripting.ScriptableDelegate[] scriptables)