public class NativeJavaObject
extends java.lang.Object
implements org.mozilla.javascript.Scriptable, org.mozilla.javascript.Wrapper, java.io.Serializable
NativeJavaArray,
NativeJavaPackage,
NativeJavaClass,
序列化表格| 构造器和说明 |
|---|
NativeJavaObject() |
NativeJavaObject(org.mozilla.javascript.Scriptable scope,
java.lang.Object javaObject,
java.lang.Class<?> staticType) |
NativeJavaObject(org.mozilla.javascript.Scriptable scope,
java.lang.Object javaObject,
java.lang.Class<?> staticType,
boolean isAdapter) |
| 限定符和类型 | 方法和说明 |
|---|---|
static boolean |
canConvert(java.lang.Object fromObj,
java.lang.Class<?> to)
Determine whether we can/should convert between the given type and the
desired one.
|
static java.lang.Object |
coerceType(java.lang.Class<?> type,
java.lang.Object value)
已过时。
as of 1.5 Release 4
|
void |
delete(int index) |
void |
delete(java.lang.String name) |
java.lang.Object |
get(int index,
org.mozilla.javascript.Scriptable start) |
java.lang.Object |
get(java.lang.String name,
org.mozilla.javascript.Scriptable start) |
java.lang.String |
getClassName() |
java.lang.Object |
getDefaultValue(java.lang.Class<?> hint) |
java.lang.Object[] |
getIds() |
org.mozilla.javascript.Scriptable |
getParentScope()
Returns the parent (enclosing) scope of the object.
|
org.mozilla.javascript.Scriptable |
getPrototype() |
boolean |
has(int index,
org.mozilla.javascript.Scriptable start) |
boolean |
has(java.lang.String name,
org.mozilla.javascript.Scriptable start) |
boolean |
hasInstance(org.mozilla.javascript.Scriptable value) |
void |
put(int index,
org.mozilla.javascript.Scriptable start,
java.lang.Object value) |
void |
put(java.lang.String name,
org.mozilla.javascript.Scriptable start,
java.lang.Object value) |
void |
setParentScope(org.mozilla.javascript.Scriptable m)
Sets the parent (enclosing) scope of the object.
|
void |
setPrototype(org.mozilla.javascript.Scriptable m)
Sets the prototype of the object.
|
java.lang.Object |
unwrap() |
static java.lang.Object |
wrap(org.mozilla.javascript.Scriptable scope,
java.lang.Object obj,
java.lang.Class<?> staticType)
已过时。
Use
Context.getWrapFactory() together with calling WrapFactory.wrap(Context, Scriptable, Object, Class) |
public NativeJavaObject()
public NativeJavaObject(org.mozilla.javascript.Scriptable scope,
java.lang.Object javaObject,
java.lang.Class<?> staticType)
public NativeJavaObject(org.mozilla.javascript.Scriptable scope,
java.lang.Object javaObject,
java.lang.Class<?> staticType,
boolean isAdapter)
public boolean has(java.lang.String name,
org.mozilla.javascript.Scriptable start)
has 在接口中 org.mozilla.javascript.Scriptablepublic boolean has(int index,
org.mozilla.javascript.Scriptable start)
has 在接口中 org.mozilla.javascript.Scriptablepublic java.lang.Object get(java.lang.String name,
org.mozilla.javascript.Scriptable start)
get 在接口中 org.mozilla.javascript.Scriptablepublic java.lang.Object get(int index,
org.mozilla.javascript.Scriptable start)
get 在接口中 org.mozilla.javascript.Scriptablepublic void put(java.lang.String name,
org.mozilla.javascript.Scriptable start,
java.lang.Object value)
put 在接口中 org.mozilla.javascript.Scriptablepublic void put(int index,
org.mozilla.javascript.Scriptable start,
java.lang.Object value)
put 在接口中 org.mozilla.javascript.Scriptablepublic boolean hasInstance(org.mozilla.javascript.Scriptable value)
hasInstance 在接口中 org.mozilla.javascript.Scriptablepublic void delete(java.lang.String name)
delete 在接口中 org.mozilla.javascript.Scriptablepublic void delete(int index)
delete 在接口中 org.mozilla.javascript.Scriptablepublic org.mozilla.javascript.Scriptable getPrototype()
getPrototype 在接口中 org.mozilla.javascript.Scriptablepublic void setPrototype(org.mozilla.javascript.Scriptable m)
setPrototype 在接口中 org.mozilla.javascript.Scriptablepublic org.mozilla.javascript.Scriptable getParentScope()
getParentScope 在接口中 org.mozilla.javascript.Scriptablepublic void setParentScope(org.mozilla.javascript.Scriptable m)
setParentScope 在接口中 org.mozilla.javascript.Scriptablepublic java.lang.Object[] getIds()
getIds 在接口中 org.mozilla.javascript.Scriptable@Deprecated
public static java.lang.Object wrap(org.mozilla.javascript.Scriptable scope,
java.lang.Object obj,
java.lang.Class<?> staticType)
Context.getWrapFactory() together with calling WrapFactory.wrap(Context, Scriptable, Object, Class)public java.lang.Object unwrap()
unwrap 在接口中 org.mozilla.javascript.Wrapperpublic java.lang.String getClassName()
getClassName 在接口中 org.mozilla.javascript.Scriptablepublic java.lang.Object getDefaultValue(java.lang.Class<?> hint)
getDefaultValue 在接口中 org.mozilla.javascript.Scriptablepublic static boolean canConvert(java.lang.Object fromObj,
java.lang.Class<?> to)
@Deprecated
public static java.lang.Object coerceType(java.lang.Class<?> type,
java.lang.Object value)