public class Environment extends ScriptableObject
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST
NOT_FOUND
Constructor and Description |
---|
Environment() |
Environment(ScriptableObject scope) |
Modifier and Type | Method and Description |
---|---|
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.
|
associateValue, avoidObjectDetection, callMethod, callMethod, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, get, get, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGetterOrSetter, getObjectPrototype, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, hasInstance, hasProperty, hasProperty, isConst, isEmpty, isExtensible, isSealed, preventExtensions, put, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setExternalArrayData, setGetterOrSetter, setParentScope, setPrototype, size
public Environment()
public Environment(ScriptableObject scope)
public static void defineClass(ScriptableObject scope)
public java.lang.String getClassName()
ScriptableObject
getClassName
in interface Scriptable
getClassName
in class ScriptableObject
public boolean has(java.lang.String name, Scriptable start)
ScriptableObject
has
in interface Scriptable
has
in class ScriptableObject
name
- the name of the propertystart
- the object in which the lookup beganScriptable.get(String, Scriptable)
,
ScriptableObject.getProperty(Scriptable, String)
public java.lang.Object get(java.lang.String name, Scriptable start)
ScriptableObject
get
in interface Scriptable
get
in class ScriptableObject
name
- the name of the propertystart
- the object in which the lookup beganContext.getUndefinedValue()
public void put(java.lang.String name, Scriptable start, java.lang.Object value)
ScriptableObject
If the property's attributes include READONLY, no action is taken. This method will actually set the property in the start object.
put
in interface Scriptable
put
in class ScriptableObject
name
- 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()
ScriptableObject
Any properties with the attribute DONTENUM are not listed.
getIds
in interface Scriptable
getIds
in class ScriptableObject
public java.lang.Object[] getAllIds()
ScriptableObject
All properties, even those with attribute DONTENUM, are listed.
getAllIds
in interface DebuggableObject
getAllIds
in class ScriptableObject
Copyright © 2010 - 2020 Adobe. All Rights Reserved