Package org.mozilla.javascript
Class Undefined
- java.lang.Object
- 
- org.mozilla.javascript.Undefined
 
- 
- All Implemented Interfaces:
- java.io.Serializable
 
 public class Undefined extends java.lang.Object implements java.io.SerializableThis class implements the Undefined value in JavaScript.We represent "undefined" internally using two static objects -- "Undefined.instance" and SCRIPTABLE_UNDEFINED. Java code that needs to make something undefined should generally use the first, and use the second if a Scriptable object is absolutely required. Java code that needs to test whether something is undefined must use the "isUndefined" method because of the multiple internal representations. - See Also:
- Serialized Form
 
- 
- 
Field SummaryFields Modifier and Type Field Description static java.lang.ObjectinstanceThis is the standard value for "undefined" in Rhino.static ScriptableSCRIPTABLE_UNDEFINEDAn alternate representation of undefined, to be used only when we need to pass it to a method that takes as Scriptable as a parameter.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)inthashCode()static booleanisUndefined(java.lang.Object obj)Safely test whether "obj" is undefined.java.lang.ObjectreadResolve()
 
- 
- 
- 
Field Detail- 
instancepublic static final java.lang.Object instance This is the standard value for "undefined" in Rhino. Java code that needs to represent "undefined" should use this object (rather than a new instance of this class).
 - 
SCRIPTABLE_UNDEFINEDpublic static final Scriptable SCRIPTABLE_UNDEFINED An alternate representation of undefined, to be used only when we need to pass it to a method that takes as Scriptable as a parameter. This is used when we need to pass undefined as the "this" parmeter of a Callable instance, because we cannot change that interface without breaking backward compatibility.
 
- 
 - 
Method Detail- 
readResolvepublic java.lang.Object readResolve() 
 - 
equalspublic boolean equals(java.lang.Object obj) - Overrides:
- equalsin class- java.lang.Object
 
 - 
hashCodepublic int hashCode() - Overrides:
- hashCodein class- java.lang.Object
 
 - 
isUndefinedpublic static boolean isUndefined(java.lang.Object obj) Safely test whether "obj" is undefined. Java code must use this function rather than testing the value directly since we have two representations of undefined in Rhino.
 
- 
 
-