Low-level wrapper for a Java class accessed via JNI. These methods map directly to the corresponding JNI functions. See the JNI documentation for more information.

Inheritance

Static Methods

fromClassObject(JniObject classObject) → JniClass

Returns a wrapper for a java.lang.Class object.

fromName(String name) → JniClass

Loads the Java class with the given fully qualified name.

Constructors

JniClass()

Properties

hashCode → int

Get a hash code for this object.

read-only, inherited
runtimeType → Type

A representation of the runtime type of the object.

read-only, inherited

Operators

operator ==(other) → bool

The equality operator.

inherited

Methods

callStaticBooleanMethod(int methodId, List args) → bool

callStaticByteMethod(int methodId, List args) → int

callStaticCharMethod(int methodId, List args) → int

callStaticDoubleMethod(int methodId, List args) → double

callStaticFloatMethod(int methodId, List args) → double

callStaticIntMethod(int methodId, List args) → int

callStaticLongMethod(int methodId, List args) → int

callStaticObjectMethod(int methodId, List args) → JniObject

callStaticShortMethod(int methodId, List args) → int

callStaticVoidMethod(int methodId, List args) → void

getFieldId(String name, String sig) → int

Returns a field ID for the instance field matching this name and type signature. See the JNI reference for explanation of type signatures.

getMethodId(String name, String sig) → int

Returns a method ID for an instance method.

getStaticBooleanField(int fieldId) → bool

getStaticByteField(int fieldId) → int

getStaticCharField(int fieldId) → int

getStaticDoubleField(int fieldId) → double

getStaticFieldId(String name, String sig) → int

Returns a field ID for a static field.

getStaticFloatField(int fieldId) → double

getStaticIntField(int fieldId) → int

getStaticLongField(int fieldId) → int

getStaticMethodId(String name, String sig) → int

Returns a method ID for a static method.

getStaticObjectField(int fieldId) → JniObject

getStaticShortField(int fieldId) → int

isAssignable(JniClass clazz) → bool

Returns true if objects of the wrapped Java class can be cast to the class described by the argument.

newObject(int methodId, List args) → JniObject

Constructs an instance of the wrapped Java class.. @param methodId The method ID of the constructor, obtained via getMethodId. @param args A list of argument values passed to the constructor. Each value should be a Dart number, bool, string, or JniObject instance.

setStaticBooleanField(int fieldId, bool value) → void

setStaticByteField(int fieldId, int value) → void

setStaticCharField(int fieldId, int value) → void

setStaticDoubleField(int fieldId, double value) → void

setStaticFloatField(int fieldId, double value) → void

setStaticIntField(int fieldId, int value) → void

setStaticLongField(int fieldId, int value) → void

setStaticObjectField(int fieldId, JniObject value) → void

setStaticShortField(int fieldId, int value) → void

callBooleanMethod(int methodId, List args) → bool

inherited
callByteMethod(int methodId, List args) → int

inherited
callCharMethod(int methodId, List args) → int

inherited
callDoubleMethod(int methodId, List args) → double

inherited
callFloatMethod(int methodId, List args) → double

inherited
callIntMethod(int methodId, List args) → int

inherited
callLongMethod(int methodId, List args) → int

inherited
callObjectMethod(int methodId, List args) → JniObject

inherited
callShortMethod(int methodId, List args) → int

inherited
callVoidMethod(int methodId, List args) → void

inherited
getBooleanField(int fieldId) → bool

inherited
getByteField(int fieldId) → int

inherited
getCharField(int fieldId) → int

inherited
getDoubleField(int fieldId) → double

inherited
getFloatField(int fieldId) → double

inherited
getIntField(int fieldId) → int

inherited
getLongField(int fieldId) → int

inherited
getObjectClass() → JniClass

inherited
getObjectField(int fieldId) → JniObject

inherited
getShortField(int fieldId) → int

inherited
noSuchMethod(Invocation invocation) → dynamic

Invoked when a non-existent method or property is accessed.

inherited
setBooleanField(int fieldId, bool value) → void

inherited
setByteField(int fieldId, int value) → void

inherited
setCharField(int fieldId, int value) → void

inherited
setDoubleField(int fieldId, double value) → void

inherited
setFloatField(int fieldId, double value) → void

inherited
setIntField(int fieldId, int value) → void

inherited
setLongField(int fieldId, int value) → void

inherited
setObjectField(int fieldId, JniObject value) → void

inherited
setShortField(int fieldId, int value) → void

inherited
toString() → String

Returns a string representation of this object.

inherited