org.apache.sling.scripting.javascript.wrapper
Class ScriptableCalendar

java.lang.Object
  extended by org.mozilla.javascript.ScriptableObject
      extended by org.apache.sling.scripting.javascript.wrapper.ScriptableBase
          extended by org.apache.sling.scripting.javascript.wrapper.ScriptableCalendar
All Implemented Interfaces:
java.io.Serializable, SlingWrapper, org.mozilla.javascript.ConstProperties, org.mozilla.javascript.debug.DebuggableObject, org.mozilla.javascript.Scriptable, org.mozilla.javascript.Wrapper

public class ScriptableCalendar
extends ScriptableBase
implements SlingWrapper

See Also:
Serialized Form

Field Summary
static java.lang.String CLASSNAME
           
static java.lang.Class<?>[] WRAPPED_CLASSES
          Calendar is a class, not an interface - so we need to enumerate possible implementations here
 
Fields inherited from class org.apache.sling.scripting.javascript.wrapper.ScriptableBase
JSFUNC_PREFIX
 
Fields inherited from class org.mozilla.javascript.ScriptableObject
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST
 
Fields inherited from interface org.mozilla.javascript.Scriptable
NOT_FOUND
 
Constructor Summary
ScriptableCalendar()
           
 
Method Summary
 java.lang.Object get(java.lang.String name, org.mozilla.javascript.Scriptable start)
           
 java.lang.String getClassName()
          The name of the JavaScript host object "class"
 java.lang.Object getDefaultValue(java.lang.Class typeHint)
           
protected  java.lang.Class<?> getStaticType()
           
 java.lang.Class<?>[] getWrappedClasses()
          The list of Java classes wrapped by this wrapper
protected  java.lang.Object getWrappedObject()
           
 void jsConstructor(java.lang.Object o)
           
 java.lang.Class<?> jsGet_javascriptWrapperClass()
          Used in testing, to check that the right wrapper is used.
 java.lang.String toString()
           
 java.lang.Object unwrap()
           
 
Methods inherited from class org.apache.sling.scripting.javascript.wrapper.ScriptableBase
getNative
 
Methods inherited from class org.mozilla.javascript.ScriptableObject
associateValue, callMethod, callMethod, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, equivalentValues, get, getAllIds, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, has, has, hasInstance, hasProperty, hasProperty, isConst, isSealed, put, put, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setGetterOrSetter, setParentScope, setPrototype
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASSNAME

public static final java.lang.String CLASSNAME
See Also:
Constant Field Values

WRAPPED_CLASSES

public static final java.lang.Class<?>[] WRAPPED_CLASSES
Calendar is a class, not an interface - so we need to enumerate possible implementations here

Constructor Detail

ScriptableCalendar

public ScriptableCalendar()
Method Detail

getWrappedClasses

public java.lang.Class<?>[] getWrappedClasses()
Description copied from interface: SlingWrapper
The list of Java classes wrapped by this wrapper

Specified by:
getWrappedClasses in interface SlingWrapper

jsConstructor

public void jsConstructor(java.lang.Object o)

get

public java.lang.Object get(java.lang.String name,
                            org.mozilla.javascript.Scriptable start)
Specified by:
get in interface org.mozilla.javascript.Scriptable
Overrides:
get in class org.mozilla.javascript.ScriptableObject

getStaticType

protected java.lang.Class<?> getStaticType()
Specified by:
getStaticType in class ScriptableBase
Returns:
the static type to use for NativeJavaObject wrapping

getWrappedObject

protected java.lang.Object getWrappedObject()
Specified by:
getWrappedObject in class ScriptableBase
Returns:
the Java object that we're wrapping, used to create a NativeJavaObject instance for default wrapping.

jsGet_javascriptWrapperClass

public java.lang.Class<?> jsGet_javascriptWrapperClass()
Description copied from class: ScriptableBase
Used in testing, to check that the right wrapper is used. For some reason, defining the method here didn't work, it had to be defined in all descendant classes.

Specified by:
jsGet_javascriptWrapperClass in class ScriptableBase

getClassName

public java.lang.String getClassName()
Description copied from interface: SlingWrapper
The name of the JavaScript host object "class"

Specified by:
getClassName in interface SlingWrapper
Specified by:
getClassName in interface org.mozilla.javascript.Scriptable
Specified by:
getClassName in class org.mozilla.javascript.ScriptableObject

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

unwrap

public java.lang.Object unwrap()
Specified by:
unwrap in interface org.mozilla.javascript.Wrapper

getDefaultValue

public java.lang.Object getDefaultValue(java.lang.Class typeHint)
Specified by:
getDefaultValue in interface org.mozilla.javascript.Scriptable
Overrides:
getDefaultValue in class org.mozilla.javascript.ScriptableObject


Copyright © 2007-2009. All Rights Reserved.