org.mozilla.javascript
Class NativeJavaClass
- Callable, Function, Scriptable, Serializable, Wrapper
public class NativeJavaClass
This class reflects Java classes into the JavaScript environment, mainly
for constructors and static members. We lazily reflect properties,
and currently do not guarantee that a single j.l.Class is only
reflected once into the JS environment, although we should.
The only known case where multiple reflections
are possible occurs when a j.l.Class is wrapped as part of a
method return or property access, rather than by walking the
Packages/java tree.
canConvert, coerceType, delete, delete, get, get, getClassName, getDefaultValue, getIds, getParentScope, getPrototype, has, has, hasInstance, initMembers, put, put, setParentScope, setPrototype, unwrap, wrap |
NativeJavaClass
public NativeJavaClass()
NativeJavaClass
public NativeJavaClass(Scriptable scope,
Class cl)
getClassObject
public Class getClassObject()
hasInstance
public boolean hasInstance(Scriptable value)
Determines if prototype is a wrapped Java object and performs
a Java "instanceof".
Exception: if value is an instance of NativeJavaClass, it isn't
considered an instance of the Java class; this forestalls any
name conflicts between java.lang.Class's methods and the
static methods exposed by a JavaNativeClass.
- hasInstance in interface Scriptable
- hasInstance in interface NativeJavaObject
toString
public String toString()