com.meterware.httpunit
Class ScriptableObject

java.lang.Object
  |
  +--com.meterware.httpunit.ScriptableObject
Direct Known Subclasses:
HTMLPage.Scriptable, WebForm.Scriptable, WebImage.Scriptable, WebLink.Scriptable, WebResponse.Scriptable

public abstract class ScriptableObject
extends java.lang.Object

An interface for objects which will be accessible via scripting.

Author:
Russell Gold

Constructor Summary
ScriptableObject()
           
 
Method Summary
 boolean doEvent(java.lang.String eventScript)
          Executes the specified scripted event.
 java.lang.Object get(java.lang.String propertyName)
          Returns the value of the named property.
 void runScript(java.lang.String script)
          Executes the specified script.
 void set(java.lang.String propertyName, java.lang.Object value)
          Sets the value of the named property.
 void setScriptEngine(ScriptEngine scriptEngine)
          Specifies the scripting engine to be used.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScriptableObject

public ScriptableObject()
Method Detail

doEvent

public boolean doEvent(java.lang.String eventScript)
Executes the specified scripted event.


runScript

public void runScript(java.lang.String script)
Executes the specified script.


get

public java.lang.Object get(java.lang.String propertyName)
Returns the value of the named property. Will return null if the property does not exist.


set

public void set(java.lang.String propertyName,
                java.lang.Object value)
Sets the value of the named property. Will throw a runtime exception if the property does not exist or cannot accept the specified value.


setScriptEngine

public void setScriptEngine(ScriptEngine scriptEngine)
Specifies the scripting engine to be used.


Copyright © 2000-2002 Russell Gold. See license agreement for rights granted.