|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.mozilla.javascript.ScriptableObject
org.mozilla.javascript.NativeJavaPackage
public class NativeJavaPackage
This class reflects Java packages into the JavaScript environment. We lazily reflect classes and subpackages, and use a caching/sharing system to ensure that members reflected into one JavaPackage appear in all other references to the same package (as with Packages.java.lang and java.lang).
NativeJavaArray,
NativeJavaObject,
NativeJavaClass,
Serialized Form| Field Summary |
|---|
| 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 | |
|---|---|
NativeJavaPackage(java.lang.String packageName)
Deprecated. NativeJavaPackage is an internal class, do not use it directly. |
|
NativeJavaPackage(java.lang.String packageName,
java.lang.ClassLoader classLoader)
Deprecated. NativeJavaPackage is an internal class, do not use it directly. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
|
java.lang.Object |
get(int index,
Scriptable start)
Returns the value of the indexed property or NOT_FOUND. |
java.lang.Object |
get(java.lang.String id,
Scriptable start)
Returns the value of the named property or NOT_FOUND. |
java.lang.String |
getClassName()
Return the name of the class. |
java.lang.Object |
getDefaultValue(java.lang.Class<?> ignored)
Implements the [[DefaultValue]] internal method. |
boolean |
has(int index,
Scriptable start)
Returns true if the property index is defined. |
boolean |
has(java.lang.String id,
Scriptable start)
Returns true if the named property is defined. |
int |
hashCode()
|
void |
put(int index,
Scriptable start,
java.lang.Object value)
Sets the value of the indexed property, creating it if need be. |
void |
put(java.lang.String id,
Scriptable start,
java.lang.Object value)
Sets the value of the named property, creating it if need be. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public NativeJavaPackage(java.lang.String packageName,
java.lang.ClassLoader classLoader)
public NativeJavaPackage(java.lang.String packageName)
| Method Detail |
|---|
public java.lang.String getClassName()
ScriptableObject
getClassName in interface ScriptablegetClassName in class ScriptableObject
public boolean has(java.lang.String id,
Scriptable start)
ScriptableObject
has in interface Scriptablehas in class ScriptableObjectid - the name of the propertystart - the object in which the lookup began
Scriptable.get(String, Scriptable),
ScriptableObject.getProperty(Scriptable, String)
public boolean has(int index,
Scriptable start)
ScriptableObject
has in interface Scriptablehas in class ScriptableObjectindex - the numeric index for the propertystart - the object in which the lookup began
Scriptable.get(int, Scriptable),
ScriptableObject.getProperty(Scriptable, int)
public void put(java.lang.String id,
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 ScriptableObjectid - 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 void put(int index,
Scriptable start,
java.lang.Object value)
ScriptableObject
put in interface Scriptableput in class ScriptableObjectindex - the numeric index for the propertystart - the object whose property is being setvalue - value to set the property toScriptable.has(int, Scriptable),
Scriptable.get(int, Scriptable),
ScriptableObject.putProperty(Scriptable, int, Object),
Context.toObject(Object, Scriptable)
public java.lang.Object get(java.lang.String id,
Scriptable start)
ScriptableObject
get in interface Scriptableget in class ScriptableObjectid - the name of the propertystart - the object in which the lookup began
Context.getUndefinedValue()
public java.lang.Object get(int index,
Scriptable start)
ScriptableObject
get in interface Scriptableget in class ScriptableObjectindex - the numeric index for the propertystart - the object in which the lookup began
Scriptable.get(String,Scriptable)public java.lang.Object getDefaultValue(java.lang.Class<?> ignored)
ScriptableObjectNote that the toPrimitive conversion is a no-op for every type other than Object, for which [[DefaultValue]] is called. See ECMA 9.1.
A hint of null means "no hint".
getDefaultValue in interface ScriptablegetDefaultValue in class ScriptableObjectignored - the type hint
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||