|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sourceforge.htmlunit.corejs.javascript.ScriptableObject
net.sourceforge.htmlunit.corejs.javascript.tools.shell.Environment
public class Environment
Environment, intended to be instantiated at global scope, provides a natural way to access System properties from JavaScript.
| Field Summary |
|---|
| Fields inherited from class net.sourceforge.htmlunit.corejs.javascript.ScriptableObject |
|---|
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST |
| Fields inherited from interface net.sourceforge.htmlunit.corejs.javascript.Scriptable |
|---|
NOT_FOUND |
| Constructor Summary | |
|---|---|
Environment()
|
|
Environment(ScriptableObject scope)
|
|
| Method Summary | |
|---|---|
static void |
defineClass(ScriptableObject scope)
|
java.lang.Object |
get(java.lang.String name,
Scriptable start)
Returns the value of the named property or NOT_FOUND. |
java.lang.Object[] |
getAllIds()
Returns an array of ids for the properties of the object. |
java.lang.String |
getClassName()
Return the name of the class. |
java.lang.Object[] |
getIds()
Returns an array of ids for the properties of the object. |
boolean |
has(java.lang.String name,
Scriptable start)
Returns true if the named property is defined. |
void |
put(java.lang.String name,
Scriptable start,
java.lang.Object value)
Sets the value of the named property, creating it if need be. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Environment()
public Environment(ScriptableObject scope)
| Method Detail |
|---|
public static void defineClass(ScriptableObject scope)
public java.lang.String getClassName()
ScriptableObject
getClassName in interface ScriptablegetClassName in class ScriptableObject
public boolean has(java.lang.String name,
Scriptable start)
ScriptableObject
has in interface Scriptablehas in class ScriptableObjectname - the name of the propertystart - the object in which the lookup began
Scriptable.get(String, Scriptable),
ScriptableObject.getProperty(Scriptable, String)
public java.lang.Object get(java.lang.String name,
Scriptable start)
ScriptableObject
get in interface Scriptableget in class ScriptableObjectname - the name of the propertystart - the object in which the lookup began
Context.getUndefinedValue()
public void put(java.lang.String name,
Scriptable start,
java.lang.Object value)
ScriptableObjectIf the property's attributes include READONLY, no action is taken. This method will actually set the property in the start object.
put in interface Scriptableput in class ScriptableObjectname - the name of the propertystart - the object whose property is being setvalue - value to set the property toScriptable.has(String, Scriptable),
Scriptable.get(String, Scriptable),
ScriptableObject.putProperty(Scriptable, String, Object),
Context.toObject(Object, Scriptable)public java.lang.Object[] getIds()
ScriptableObjectAny properties with the attribute DONTENUM are not listed.
getIds in interface ScriptablegetIds in class ScriptableObjectpublic java.lang.Object[] getAllIds()
ScriptableObjectAll properties, even those with attribute DONTENUM, are listed.
getAllIds in interface DebuggableObjectgetAllIds in class ScriptableObject
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||