org.mozilla.javascript
public class NativeJavaObject extends Object implements Scriptable, Wrapper, Serializable
See Also: NativeJavaArray NativeJavaPackage NativeJavaClass
| Field Summary | |
|---|---|
| protected Object | javaObject |
| protected JavaMembers | members |
| protected Scriptable | parent
The parent scope of this object. |
| protected Scriptable | prototype
The prototype of this object. |
| protected Class | staticType |
| Constructor Summary | |
|---|---|
| NativeJavaObject() | |
| NativeJavaObject(Scriptable scope, Object javaObject, Class staticType) | |
| Method Summary | |
|---|---|
| static boolean | canConvert(Object fromObj, Class to)
Determine whether we can/should convert between the given type and the
desired one. |
| static Object | coerceType(Class type, Object value)
Not intended for public use. |
| void | delete(String name) |
| void | delete(int index) |
| Object | get(String name, Scriptable start) |
| Object | get(int index, Scriptable start) |
| String | getClassName() |
| Object | getDefaultValue(Class hint) |
| Object[] | getIds() |
| Scriptable | getParentScope()
Returns the parent (enclosing) scope of the object. |
| Scriptable | getPrototype() |
| boolean | has(String name, Scriptable start) |
| boolean | has(int index, Scriptable start) |
| boolean | hasInstance(Scriptable value) |
| protected void | initMembers() |
| void | put(String name, Scriptable start, Object value) |
| void | put(int index, Scriptable start, Object value) |
| void | setParentScope(Scriptable m)
Sets the parent (enclosing) scope of the object. |
| void | setPrototype(Scriptable m)
Sets the prototype of the object. |
| Object | unwrap() |
| static Object | wrap(Scriptable scope, Object obj, Class staticType) |
Deprecated: as of 1.5 Release 4
Not intended for public use. Callers should use the public API Context.toType.See Also: .
Deprecated: Use getWrapFactory together with calling WrapFactory