public class NativeJavaPackage extends ScriptableObject
NativeJavaArray
,
NativeJavaObject
,
NativeJavaClass
,
序列化表格CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST
NOT_FOUND
构造器和说明 |
---|
NativeJavaPackage(java.lang.String packageName)
已过时。
NativeJavaPackage is an internal class, do not use
it directly.
|
NativeJavaPackage(java.lang.String packageName,
java.lang.ClassLoader classLoader)
已过时。
NativeJavaPackage is an internal class, do not use
it directly.
|
限定符和类型 | 方法和说明 |
---|---|
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() |
applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, equivalentValues, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getSlot, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, hasInstance, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setGetterOrSetter, setParentScope, setPrototype, size
public NativeJavaPackage(java.lang.String packageName, java.lang.ClassLoader classLoader)
public NativeJavaPackage(java.lang.String packageName)
public java.lang.String getClassName()
ScriptableObject
getClassName
在接口中 Scriptable
getClassName
在类中 ScriptableObject
public boolean has(java.lang.String id, Scriptable start)
ScriptableObject
has
在接口中 Scriptable
has
在类中 ScriptableObject
id
- the name of the propertystart
- the object in which the lookup beganScriptable.get(String, Scriptable)
,
ScriptableObject.getProperty(Scriptable, String)
public boolean has(int index, Scriptable start)
ScriptableObject
has
在接口中 Scriptable
has
在类中 ScriptableObject
index
- the numeric index for the propertystart
- the object in which the lookup beganScriptable.get(int, Scriptable)
,
ScriptableObject.getProperty(Scriptable, int)
public void put(java.lang.String id, Scriptable start, java.lang.Object value)
ScriptableObject
If the property's attributes include READONLY, no action is taken. This method will actually set the property in the start object.
put
在接口中 Scriptable
put
在类中 ScriptableObject
id
- 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
在接口中 Scriptable
put
在类中 ScriptableObject
index
- 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
在接口中 Scriptable
get
在类中 ScriptableObject
id
- the name of the propertystart
- the object in which the lookup beganContext.getUndefinedValue()
public java.lang.Object get(int index, Scriptable start)
ScriptableObject
get
在接口中 Scriptable
get
在类中 ScriptableObject
index
- the numeric index for the propertystart
- the object in which the lookup beganScriptable.get(String,Scriptable)
public java.lang.Object getDefaultValue(java.lang.Class<?> ignored)
ScriptableObject
Note 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
在接口中 Scriptable
getDefaultValue
在类中 ScriptableObject
ignored
- the type hintpublic java.lang.String toString()
toString
在类中 java.lang.Object
public boolean equals(java.lang.Object obj)
equals
在类中 java.lang.Object
public int hashCode()
hashCode
在类中 java.lang.Object