public class ScriptableMap extends ScriptableBase implements SlingWrapper
ScriptableMap
wrapper provides easier access to a map's values by setting the map's keys as properties to the JavaScript
object representing the Map
.Modifier and Type | Field and Description |
---|---|
static String |
CLASSNAME |
JSFUNC_PREFIX
Constructor and Description |
---|
ScriptableMap() |
Modifier and Type | Method and Description |
---|---|
Object |
get(String name,
org.mozilla.javascript.Scriptable start) |
String |
getClassName()
The name of the JavaScript host object "class".
|
Object |
getDefaultValue(Class<?> typeHint) |
protected Class<?> |
getStaticType() |
Class<?>[] |
getWrappedClasses()
The list of Java classes wrapped by this wrapper.
|
protected Object |
getWrappedObject() |
void |
jsConstructor(Object map) |
Object |
unwrap() |
getNative
applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, equivalentValues, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getSlot, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, has, hasInstance, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, put, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setExternalArrayData, setGetterOrSetter, setParentScope, setPrototype, size
public static final String CLASSNAME
public void jsConstructor(Object map)
public Object get(String name, org.mozilla.javascript.Scriptable start)
get
in interface org.mozilla.javascript.Scriptable
get
in class org.mozilla.javascript.ScriptableObject
public Object getDefaultValue(Class<?> typeHint)
getDefaultValue
in interface org.mozilla.javascript.Scriptable
getDefaultValue
in class org.mozilla.javascript.ScriptableObject
protected Object getWrappedObject()
getWrappedObject
in class ScriptableBase
protected Class<?> getStaticType()
getStaticType
in class ScriptableBase
public String getClassName()
SlingWrapper
getClassName
in interface SlingWrapper
getClassName
in interface org.mozilla.javascript.Scriptable
getClassName
in class org.mozilla.javascript.ScriptableObject
public Class<?>[] getWrappedClasses()
SlingWrapper
getWrappedClasses
in interface SlingWrapper
public Object unwrap()
unwrap
in interface org.mozilla.javascript.Wrapper
Copyright © 2017 The Apache Software Foundation. All rights reserved.