public class Environment extends ScriptableObject
ScriptableObject.KeyComparatorCONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONSTNOT_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.
|
applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, delete, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, ensureSymbolScriptable, equivalentValues, get, get, get, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGetterOrSetter, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getProperty, getPropertyIds, getPrototype, getSlot, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, has, hasInstance, hasProperty, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, put, putConst, putConstProperty, putProperty, putProperty, putProperty, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setAttributes, setExternalArrayData, setGetterOrSetter, setParentScope, setPrototype, sizepublic Environment()
public Environment(ScriptableObject scope)
public static void defineClass(ScriptableObject scope)
public java.lang.String getClassName()
ScriptableObjectgetClassName in interface ScriptablegetClassName in class ScriptableObjectpublic boolean has(java.lang.String name,
Scriptable start)
ScriptableObjecthas in interface Scriptablehas in class ScriptableObjectname - 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)
ScriptableObjectget in interface Scriptableget in class ScriptableObjectname - 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)
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