def initialize(self, jenv: jni.JNIEnv): with JFrame(jenv, 1): jcls = jenv.FindClass(b"java/io/PrintWriter") self.Class = jni.cast(jenv.NewGlobalRef(jcls), jni.jclass) self.Constructor = jenv.GetMethodID(jcls, b"<init>", b"(Ljava/io/Writer;)V") self.flush = jenv.GetMethodID(jcls, b"flush", b"()V")
def initialize(self, jenv: jni.JNIEnv): with JFrame(jenv, 1): jcls = jenv.FindClass(b"java/lang/reflect/Constructor") self.Class = jni.cast(jenv.NewGlobalRef(jcls), jni.jclass) self.getParameterTypes = jenv.GetMethodID(jcls, b"getParameterTypes", b"()[Ljava/lang/Class;") self.getExceptionTypes = jenv.GetMethodID(jcls, b"getExceptionTypes", b"()[Ljava/lang/Class;") self.isVarArgs = jenv.GetMethodID(jcls, b"isVarArgs", b"()Z")
def initialize(self, jenv: jni.JNIEnv): with JFrame(jenv, 1): jcls = jenv.FindClass(b"java/lang/reflect/AnnotatedElement") self.Class = jni.cast(jenv.NewGlobalRef(jcls), jni.jclass) self.getDeclaredAnnotations = jenv.GetMethodID(jcls, b"getDeclaredAnnotations", b"()[Ljava/lang/annotation/Annotation;") self.getAnnotations = jenv.GetMethodID(jcls, b"getAnnotations", b"()[Ljava/lang/annotation/Annotation;") self.getAnnotation = jenv.GetMethodID(jcls, b"getAnnotation", b"(Ljava/lang/Class;)Ljava/lang/annotation/Annotation;") self.isAnnotationPresent = jenv.GetMethodID(jcls, b"isAnnotationPresent", b"(Ljava/lang/Class;)Z")
def initialize(self, jenv: jni.JNIEnv): with JFrame(jenv, 1): jcls = jenv.FindClass(b"java/lang/Object") self.Class = jni.cast(jenv.NewGlobalRef(jcls), jni.jclass) self.getClass = jenv.GetMethodID(jcls, b"getClass", b"()Ljava/lang/Class;") self.hashCode = jenv.GetMethodID(jcls, b"hashCode", b"()I") self.toString = jenv.GetMethodID(jcls, b"toString", b"()Ljava/lang/String;") self.equals = jenv.GetMethodID(jcls, b"equals", b"(Ljava/lang/Object;)Z")
def initialize(self, jenv: jni.JNIEnv): with JFrame(jenv, 1): jcls = jenv.FindClass(b"java/lang/reflect/Member") self.Class = jni.cast(jenv.NewGlobalRef(jcls), jni.jclass) self.getName = jenv.GetMethodID(jcls, b"getName", b"()Ljava/lang/String;") self.getModifiers = jenv.GetMethodID(jcls, b"getModifiers", b"()I") self.getDeclaringClass = jenv.GetMethodID(jcls, b"getDeclaringClass", b"()Ljava/lang/Class;") self.isSynthetic = jenv.GetMethodID(jcls, b"isSynthetic", b"()Z")
def initialize(self, jenv: jni.JNIEnv): with JFrame(jenv, 1): jcls = jenv.FindClass(b"java/lang/String") self.Class = jni.cast(jenv.NewGlobalRef(jcls), jni.jclass) self.ConstructorFromBytes = jenv.GetMethodID( jcls, b"<init>", b"([BLjava/lang/String;)V") self.getBytes = jenv.GetMethodID(jcls, b"getBytes", b"(Ljava/lang/String;)[B")
def initialize(self, jenv: jni.JNIEnv): with JFrame(jenv, 1): jcls = jenv.FindClass(b"java/lang/reflect/Field") self.Class = jni.cast(jenv.NewGlobalRef(jcls), jni.jclass) self.getType = jenv.GetMethodID(jcls, b"getType", b"()Ljava/lang/Class;") self.isEnumConstant = jenv.GetMethodID(jcls, b"isEnumConstant", b"()Z")
def initialize(self, jenv: jni.JNIEnv): with JFrame(jenv, 2): jcls = jenv.FindClass(b"java/lang/Character") TYPE = jenv.GetStaticObjectField(jcls, jenv.GetStaticFieldID(jcls, b"TYPE", b"Ljava/lang/Class;")) self.Class = jni.cast(jenv.NewGlobalRef(jcls), jni.jclass) self.TYPE = jni.cast(jenv.NewGlobalRef(TYPE), jni.jclass) self.Constructor = jenv.GetMethodID (jcls, b"<init>", b"(C)V") self.valueOf = jenv.GetStaticMethodID(jcls, b"valueOf", b"(C)Ljava/lang/Character;") self.charValue = jenv.GetMethodID (jcls, b"charValue", b"()C")
def initialize(self, jenv: jni.JNIEnv): from .org.jt.reflect import ProxyHandler registerClass(jenv, "org.jt.reflect.ProxyHandler", ProxyHandler) with JFrame(jenv, 1): jcls = jenv.FindClass(b"org/jt/reflect/ProxyHandler") self.Class = jni.cast(jenv.NewGlobalRef(jcls), jni.jclass) self.Constructor = jenv.GetMethodID(jcls, b"<init>", b"(J)V") self.getClass = jenv.GetMethodID(jcls, b"getClass", b"()Ljava/lang/Class;")
def initialize(self, jenv: jni.JNIEnv): with JFrame(jenv, 1): jcls = jenv.FindClass(b"java/lang/Throwable") self.Class = jni.cast(jenv.NewGlobalRef(jcls), jni.jclass) self.getMessage = jenv.GetMethodID(jcls, b"getMessage", b"()Ljava/lang/String;") self.getLocalizedMessage = jenv.GetMethodID(jcls, b"getLocalizedMessage", b"()Ljava/lang/String;") self.getCause = jenv.GetMethodID(jcls, b"getCause", b"()Ljava/lang/Throwable;") self.getStackTrace = jenv.GetMethodID(jcls, b"getStackTrace", b"()[Ljava/lang/StackTraceElement;") self.setStackTrace = jenv.GetMethodID(jcls, b"setStackTrace", b"([Ljava/lang/StackTraceElement;)V") self.printStackTrace = jenv.GetMethodID(jcls, b"printStackTrace", b"(Ljava/io/PrintWriter;)V")
def initialize(self, jenv: jni.JNIEnv): with JFrame(jenv, 1): jcls = jenv.FindClass(b"java/lang/Number") self.Class = jni.cast(jenv.NewGlobalRef(jcls), jni.jclass) self.byteValue = jenv.GetMethodID(jcls, b"byteValue", b"()B") self.shortValue = jenv.GetMethodID(jcls, b"shortValue", b"()S") self.intValue = jenv.GetMethodID(jcls, b"intValue", b"()I") self.longValue = jenv.GetMethodID(jcls, b"longValue", b"()J") self.floatValue = jenv.GetMethodID(jcls, b"floatValue", b"()F") self.doubleValue = jenv.GetMethodID(jcls, b"doubleValue", b"()D")
def initialize(self, jenv: jni.JNIEnv): with JFrame(jenv, 1): jcls = jenv.FindClass(b"java/lang/reflect/Method") self.Class = jni.cast(jenv.NewGlobalRef(jcls), jni.jclass) self.getReturnType = jenv.GetMethodID(jcls, b"getReturnType", b"()Ljava/lang/Class;") self.getParameterTypes = jenv.GetMethodID(jcls, b"getParameterTypes", b"()[Ljava/lang/Class;") self.getExceptionTypes = jenv.GetMethodID(jcls, b"getExceptionTypes", b"()[Ljava/lang/Class;") self.isVarArgs = jenv.GetMethodID(jcls, b"isVarArgs", b"()Z") self.isBridge = jenv.GetMethodID(jcls, b"isBridge", b"()Z") self.toGenericString = jenv.GetMethodID(jcls, b"toGenericString", b"()Ljava/lang/String;")
def initialize(self, jenv: jni.JNIEnv): with JFrame(jenv, 2): jfcls = jenv.FindClass(b"java/beans/FeatureDescriptor") jcls = jenv.FindClass(b"java/beans/PropertyDescriptor") self.Class = jni.cast(jenv.NewGlobalRef(jcls), jni.jclass) self.hashCode = jenv.GetMethodID(jcls, b"hashCode", b"()I") self.toString = jenv.GetMethodID(jcls, b"toString", b"()Ljava/lang/String;") self.getName = jenv.GetMethodID(jfcls, b"getName", b"()Ljava/lang/String;") self.getPropertyType = jenv.GetMethodID(jcls, b"getPropertyType", b"()Ljava/lang/Class;") self.getReadMethod = jenv.GetMethodID(jcls, b"getReadMethod", b"()Ljava/lang/reflect/Method;") self.getWriteMethod = jenv.GetMethodID(jcls, b"getWriteMethod", b"()Ljava/lang/reflect/Method;") self.setReadMethod = jenv.GetMethodID(jcls, b"setReadMethod", b"(Ljava/lang/reflect/Method;)V") self.setWriteMethod = jenv.GetMethodID(jcls, b"setWriteMethod", b"(Ljava/lang/reflect/Method;)V")
def initialize(self, jenv: jni.JNIEnv): with JFrame(jenv, 1): jcls = jenv.FindClass(b"java/lang/Package") self.Class = jni.cast(jenv.NewGlobalRef(jcls), jni.jclass) self.getPackage = jenv.GetStaticMethodID(jcls, b"getPackage", b"(Ljava/lang/String;)Ljava/lang/Package;") self.getPackages = jenv.GetStaticMethodID(jcls, b"getPackages", b"()[Ljava/lang/Package;") self.getName = jenv.GetMethodID(jcls, b"getName", b"()Ljava/lang/String;") self.getSpecificationTitle = jenv.GetMethodID(jcls, b"getSpecificationTitle", b"()Ljava/lang/String;") self.getSpecificationVersion = jenv.GetMethodID(jcls, b"getSpecificationVersion", b"()Ljava/lang/String;") self.getSpecificationVendor = jenv.GetMethodID(jcls, b"getSpecificationVendor", b"()Ljava/lang/String;") self.getImplementationTitle = jenv.GetMethodID(jcls, b"getImplementationTitle", b"()Ljava/lang/String;") self.getImplementationVersion = jenv.GetMethodID(jcls, b"getImplementationVersion", b"()Ljava/lang/String;") self.getImplementationVendor = jenv.GetMethodID(jcls, b"getImplementationVendor", b"()Ljava/lang/String;") self.isSealed = jenv.GetMethodID(jcls, b"isSealed", b"()Z")
def initialize(self, jenv: jni.JNIEnv): from .org.jt.ref import ReferenceQueue, ReferenceQueue_Worker registerClass(jenv, "org.jt.ref.ReferenceQueue", ReferenceQueue) registerClass(jenv, "org.jt.ref.ReferenceQueue$Worker", ReferenceQueue_Worker) with JFrame(jenv, 1): jcls = jenv.FindClass(b"org/jt/ref/ReferenceQueue") self.Class = jni.cast(jenv.NewGlobalRef(jcls), jni.jclass) self.Constructor = jenv.GetMethodID(jcls, b"<init>", b"()V") self.start = jenv.GetMethodID(jcls, b"start", b"()V") self.stop = jenv.GetMethodID(jcls, b"stop", b"()V") self.registerReference = jenv.GetMethodID( jcls, b"registerReference", b"(Ljava/lang/Object;J)Lorg/jt/ref/Reference;")
def initialize(self, jenv: jni.JNIEnv): with JFrame(jenv, 1): jcls = jenv.FindClass(b"java/beans/BeanInfo") self.Class = jni.cast(jenv.NewGlobalRef(jcls), jni.jclass) self.getPropertyDescriptors = jenv.GetMethodID( jcls, b"getPropertyDescriptors", b"()[Ljava/beans/PropertyDescriptor;")
def initialize(self, jenv: jni.JNIEnv): with JFrame(jenv, 1): jcls = jenv.FindClass(b"java/lang/StackTraceElement") self.Class = jni.cast(jenv.NewGlobalRef(jcls), jni.jclass) self.Constructor = jenv.GetMethodID( jcls, b"<init>", b"(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;I)V")
def initialize(self, jenv: jni.JNIEnv): from .org.jt.ref import Reference registerClass(jenv, "org.jt.ref.Reference", Reference) with JFrame(jenv, 1): jcls = jenv.FindClass(b"org/jt/ref/Reference") self.Class = jni.cast(jenv.NewGlobalRef(jcls), jni.jclass) self.Constructor = jenv.GetMethodID( jcls, b"<init>", b"(Ljava/lang/Object;JLjava/lang/ref/ReferenceQueue;)V")
def initialize(self, jenv: jni.JNIEnv): with JFrame(jenv, 2): jcls = jenv.FindClass(b"java/lang/Double") TYPE = jenv.GetStaticObjectField(jcls, jenv.GetStaticFieldID(jcls, b"TYPE", b"Ljava/lang/Class;")) self.Class = jni.cast(jenv.NewGlobalRef(jcls), jni.jclass) self.TYPE = jni.cast(jenv.NewGlobalRef(TYPE), jni.jclass) self.Constructor = jenv.GetMethodID (jcls, b"<init>", b"(D)V") self.valueOf = jenv.GetStaticMethodID(jcls, b"valueOf", b"(D)Ljava/lang/Double;") self.MIN_VALUE = jenv.GetStaticDoubleField(jcls, jenv.GetStaticFieldID(jcls, b"MIN_VALUE", b"D")) self.MAX_VALUE = jenv.GetStaticDoubleField(jcls, jenv.GetStaticFieldID(jcls, b"MAX_VALUE", b"D"))
def initialize(self, jenv: jni.JNIEnv): with JFrame(jenv, 2): jcls = jenv.FindClass(b"java/lang/Long") TYPE = jenv.GetStaticObjectField(jcls, jenv.GetStaticFieldID(jcls, b"TYPE", b"Ljava/lang/Class;")) self.Class = jni.cast(jenv.NewGlobalRef(jcls), jni.jclass) self.TYPE = jni.cast(jenv.NewGlobalRef(TYPE), jni.jclass) self.Constructor = jenv.GetMethodID (jcls, b"<init>", b"(J)V") self.valueOf = jenv.GetStaticMethodID(jcls, b"valueOf", b"(J)Ljava/lang/Long;") self.MIN_VALUE = jenv.GetStaticLongField(jcls, jenv.GetStaticFieldID(jcls, b"MIN_VALUE", b"J")) self.MAX_VALUE = jenv.GetStaticLongField(jcls, jenv.GetStaticFieldID(jcls, b"MAX_VALUE", b"J")) # Some JVM's incorrectly return positive values if self.MIN_VALUE > 0: self.MIN_VALUE = -self.MIN_VALUE
def initialize(self, jenv: jni.JNIEnv): with JFrame(jenv, 7): jcls = jenv.FindClass(b"java/nio/ByteBuffer") self.ByteBufferClass = jni.cast(jenv.NewGlobalRef(jcls), jni.jclass) self.ByteBuffer_order = jenv.GetMethodID( jcls, b"order", b"()Ljava/nio/ByteOrder;") jcls = jenv.FindClass(b"java/nio/ShortBuffer") self.ShortBufferClass = jni.cast(jenv.NewGlobalRef(jcls), jni.jclass) self.ShortBuffer_order = jenv.GetMethodID( jcls, b"order", b"()Ljava/nio/ByteOrder;") jcls = jenv.FindClass(b"java/nio/IntBuffer") self.IntBufferClass = jni.cast(jenv.NewGlobalRef(jcls), jni.jclass) self.IntBuffer_order = jenv.GetMethodID(jcls, b"order", b"()Ljava/nio/ByteOrder;") jcls = jenv.FindClass(b"java/nio/LongBuffer") self.LongBufferClass = jni.cast(jenv.NewGlobalRef(jcls), jni.jclass) self.LongBuffer_order = jenv.GetMethodID( jcls, b"order", b"()Ljava/nio/ByteOrder;") jcls = jenv.FindClass(b"java/nio/FloatBuffer") self.FloatBufferClass = jni.cast(jenv.NewGlobalRef(jcls), jni.jclass) self.FloatBuffer_order = jenv.GetMethodID( jcls, b"order", b"()Ljava/nio/ByteOrder;") jcls = jenv.FindClass(b"java/nio/DoubleBuffer") self.DoubleBufferClass = jni.cast(jenv.NewGlobalRef(jcls), jni.jclass) self.DoubleBuffer_order = jenv.GetMethodID( jcls, b"order", b"()Ljava/nio/ByteOrder;") jcls = jenv.FindClass(b"java/nio/ByteOrder") self.ByteOrderClass = jni.cast(jenv.NewGlobalRef(jcls), jni.jclass) self.ByteOrder_nativeOrder = jenv.GetStaticMethodID( jcls, b"nativeOrder", b"()Ljava/nio/ByteOrder;")
def initialize(self, jenv: jni.JNIEnv): with JFrame(jenv, 1): jcls = jenv.FindClass(b"java/lang/ClassLoader") self.Class = jni.cast(jenv.NewGlobalRef(jcls), jni.jclass) self.getSystemClassLoader = jenv.GetStaticMethodID(jcls, b"getSystemClassLoader", b"()Ljava/lang/ClassLoader;") self.getParent = jenv.GetMethodID(jcls, b"getParent", b"()Ljava/lang/ClassLoader;") self.getPackage = jenv.GetMethodID(jcls, b"getPackage", b"(Ljava/lang/String;)Ljava/lang/Package;") self.getPackages = jenv.GetMethodID(jcls, b"getPackages", b"()[Ljava/lang/Package;") self.findClass = jenv.GetMethodID(jcls, b"findClass", b"(Ljava/lang/String;)Ljava/lang/Class;") self.findLoadedClass = jenv.GetMethodID(jcls, b"findLoadedClass", b"(Ljava/lang/String;)Ljava/lang/Class;") self.findSystemClass = jenv.GetMethodID(jcls, b"findSystemClass", b"(Ljava/lang/String;)Ljava/lang/Class;") self.loadClass = jenv.GetMethodID(jcls, b"loadClass", b"(Ljava/lang/String;)Ljava/lang/Class;") self.definePackage = jenv.GetMethodID(jcls, b"definePackage", b"(Ljava/lang/String;" b"Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;" b"Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;" b"Ljava/net/URL;)Ljava/lang/Package;") self.defineClass = jenv.GetMethodID(jcls, b"defineClass", b"(Ljava/lang/String;[BII)Ljava/lang/Class;") self.getResource = jenv.GetMethodID(jcls, b"getResource", b"(Ljava/lang/String;)Ljava/net/URL;") self.getResources = jenv.GetMethodID(jcls, b"getResources", b"(Ljava/lang/String;)Ljava/util/Enumeration;") self.getSystemResource = jenv.GetStaticMethodID(jcls, b"getSystemResource", b"(Ljava/lang/String;)Ljava/net/URL;") self.getSystemResources = jenv.GetStaticMethodID(jcls, b"getSystemResources", b"(Ljava/lang/String;)Ljava/util/Enumeration;") self.findLibrary = jenv.GetMethodID(jcls, b"findLibrary", b"(Ljava/lang/String;)Ljava/lang/String;")
def initialize(self, jenv: jni.JNIEnv): with JFrame(jenv, 1): jcls = jenv.FindClass(b"java/lang/Thread") self.Class = jni.cast(jenv.NewGlobalRef(jcls), jni.jclass) self.currentThread = jenv.GetStaticMethodID(jcls, b"currentThread", b"()Ljava/lang/Thread;") self.getId = jenv.GetMethodID(jcls, b"getId", b"()J") self.getName = jenv.GetMethodID(jcls, b"getName", b"()Ljava/lang/String;") self.getContextClassLoader = jenv.GetMethodID(jcls, b"getContextClassLoader", b"()Ljava/lang/ClassLoader;") self.setContextClassLoader = jenv.GetMethodID(jcls, b"setContextClassLoader", b"(Ljava/lang/ClassLoader;)V") self.isDaemon = jenv.GetMethodID(jcls, b"isDaemon", b"()Z") self.isAlive = jenv.GetMethodID(jcls, b"isAlive", b"()Z") self.isInterrupted = jenv.GetMethodID(jcls, b"isInterrupted", b"()Z") self.start = jenv.GetMethodID(jcls, b"start", b"()V") self.join = jenv.GetMethodID(jcls, b"join", b"()V") self.interrupt = jenv.GetMethodID(jcls, b"interrupt", b"()V") self.getStackTrace = jenv.GetMethodID(jcls, b"getStackTrace", b"()[Ljava/lang/StackTraceElement;")
def initialize(self, jenv: jni.JNIEnv): with JFrame(jenv, 1): jcls = jenv.FindClass(b"java/lang/Iterable") self.Class = jni.cast(jenv.NewGlobalRef(jcls), jni.jclass) self.iterator = jenv.GetMethodID(jcls, b"iterator", b"()Ljava/util/Iterator;")
def initialize(self, jenv: jni.JNIEnv): with JFrame(jenv, 9): jcls = jenv.FindClass(b"java/util/List") self.ListClass = jni.cast(jenv.NewGlobalRef(jcls), jni.jclass) self.List_addAll = jenv.GetMethodID(jcls, b"addAll", b"(Ljava/util/Collection;)Z") self.List_add = jenv.GetMethodID(jcls, b"add", b"(Ljava/lang/Object;)Z") self.List_get = jenv.GetMethodID(jcls, b"get", b"(I)Ljava/lang/Object;") self.List_set = jenv.GetMethodID(jcls, b"set", b"(ILjava/lang/Object;)Ljava/lang/Object;") self.List_remove = jenv.GetMethodID(jcls, b"remove", b"(I)Ljava/lang/Object;") self.List_clear = jenv.GetMethodID(jcls, b"clear", b"()V") self.List_subList = jenv.GetMethodID(jcls, b"subList", b"(II)Ljava/util/List;") jcls = jenv.FindClass(b"java/util/Set") self.SetClass = jni.cast(jenv.NewGlobalRef(jcls), jni.jclass) jcls = jenv.FindClass(b"java/util/Map") self.MapClass = jni.cast(jenv.NewGlobalRef(jcls), jni.jclass) self.Map_size = jenv.GetMethodID(jcls, b"size", b"()I") self.Map_containsKey = jenv.GetMethodID(jcls, b"containsKey", b"(Ljava/lang/Object;)Z") self.Map_get = jenv.GetMethodID(jcls, b"get", b"(Ljava/lang/Object;)Ljava/lang/Object;") self.Map_put = jenv.GetMethodID(jcls, b"put", b"(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;") self.Map_remove = jenv.GetMethodID(jcls, b"remove", b"(Ljava/lang/Object;)Ljava/lang/Object;") self.Map_clear = jenv.GetMethodID(jcls, b"clear", b"()V") self.Map_keySet = jenv.GetMethodID(jcls, b"keySet", b"()Ljava/util/Set;") self.Map_entrySet = jenv.GetMethodID(jcls, b"entrySet", b"()Ljava/util/Set;") jcls = jenv.FindClass(b"java/util/Map$Entry") self.MapEntryClass = jni.cast(jenv.NewGlobalRef(jcls), jni.jclass) self.MapEntry_getKey = jenv.GetMethodID(jcls, b"getKey", b"()Ljava/lang/Object;") self.MapEntry_getValue = jenv.GetMethodID(jcls, b"getValue", b"()Ljava/lang/Object;") jcls = jenv.FindClass(b"java/util/Iterator") self.IteratorClass = jni.cast(jenv.NewGlobalRef(jcls), jni.jclass) self.Iterator_hasNext = jenv.GetMethodID(jcls, b"hasNext", b"()Z") self.Iterator_next = jenv.GetMethodID(jcls, b"next", b"()Ljava/lang/Object;") jcls = jenv.FindClass(b"java/util/Collection") self.CollectionClass = jni.cast(jenv.NewGlobalRef(jcls), jni.jclass) self.Collection_size = jenv.GetMethodID(jcls, b"size", b"()I") self.Collection_contains = jenv.GetMethodID(jcls, b"contains", b"(Ljava/lang/Object;)Z") self.Collection_iterator = jenv.GetMethodID(jcls, b"iterator", b"()Ljava/util/Iterator;") jcls = jenv.FindClass(b"java/util/Collections") self.CollectionsClass = jni.cast(jenv.NewGlobalRef(jcls), jni.jclass) self.Collections_unmodifiableList = jenv.GetStaticMethodID(jcls, b"unmodifiableList", b"(Ljava/util/List;)Ljava/util/List;") jcls = jenv.FindClass(b"java/util/ArrayList") self.ArrayListClass = jni.cast(jenv.NewGlobalRef(jcls), jni.jclass) self.ArrayListConstructorInt = jenv.GetMethodID(jcls, b"<init>", b"(I)V") self.ArrayList_add = jenv.GetMethodID(jcls, b"add", b"(Ljava/lang/Object;)Z") jcls = jenv.FindClass(b"java/util/HashMap") self.HashMapClass = jni.cast(jenv.NewGlobalRef(jcls), jni.jclass) self.HashMapConstructorInt = jenv.GetMethodID(jcls, b"<init>", b"(I)V") self.HashMap_put = jenv.GetMethodID(jcls, b"put", b"(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;")
def initialize(self, jenv: jni.JNIEnv): with JFrame(jenv, 1): jcls = jenv.FindClass(b"java/lang/Class") self.Class = jni.cast(jenv.NewGlobalRef(jcls), jni.jclass) self.forName = jenv.GetStaticMethodID(jcls, b"forName", b"(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;") self.asSubclass = jenv.GetMethodID(jcls, b"asSubclass", b"(Ljava/lang/Class;)Ljava/lang/Class;") self.getClassLoader = jenv.GetMethodID(jcls, b"getClassLoader", b"()Ljava/lang/ClassLoader;") self.getPackage = jenv.GetMethodID(jcls, b"getPackage", b"()Ljava/lang/Package;") self.getName = jenv.GetMethodID(jcls, b"getName", b"()Ljava/lang/String;") self.getSimpleName = jenv.GetMethodID(jcls, b"getSimpleName", b"()Ljava/lang/String;") self.getCanonicalName = jenv.GetMethodID(jcls, b"getCanonicalName", b"()Ljava/lang/String;") self.getComponentType = jenv.GetMethodID(jcls, b"getComponentType", b"()Ljava/lang/Class;") self.getModifiers = jenv.GetMethodID(jcls, b"getModifiers", b"()I") self.getSuperclass = jenv.GetMethodID(jcls, b"getSuperclass", b"()Ljava/lang/Class;") self.getInterfaces = jenv.GetMethodID(jcls, b"getInterfaces", b"()[Ljava/lang/Class;") self.getDeclaredClasses = jenv.GetMethodID(jcls, b"getDeclaredClasses", b"()[Ljava/lang/Class;") self.getDeclaredConstructors = jenv.GetMethodID(jcls, b"getDeclaredConstructors", b"()[Ljava/lang/reflect/Constructor;") self.getDeclaredField = jenv.GetMethodID(jcls, b"getDeclaredField", b"(Ljava/lang/String;)Ljava/lang/reflect/Field;") self.getDeclaredFields = jenv.GetMethodID(jcls, b"getDeclaredFields", b"()[Ljava/lang/reflect/Field;") self.getDeclaredMethods = jenv.GetMethodID(jcls, b"getDeclaredMethods", b"()[Ljava/lang/reflect/Method;") self.getClasses = jenv.GetMethodID(jcls, b"getClasses", b"()[Ljava/lang/Class;") self.getConstructors = jenv.GetMethodID(jcls, b"getConstructors", b"()[Ljava/lang/reflect/Constructor;") self.getField = jenv.GetMethodID(jcls, b"getField", b"(Ljava/lang/String;)Ljava/lang/reflect/Field;") self.getFields = jenv.GetMethodID(jcls, b"getFields", b"()[Ljava/lang/reflect/Field;") self.getMethods = jenv.GetMethodID(jcls, b"getMethods", b"()[Ljava/lang/reflect/Method;") self.getEnclosingClass = jenv.GetMethodID(jcls, b"getEnclosingClass", b"()Ljava/lang/Class;") self.getEnclosingConstructor = jenv.GetMethodID(jcls, b"getEnclosingConstructor", b"()Ljava/lang/reflect/Constructor;") self.getEnclosingMethod = jenv.GetMethodID(jcls, b"getEnclosingMethod", b"()Ljava/lang/reflect/Method;") self.isAssignableFrom = jenv.GetMethodID(jcls, b"isAssignableFrom", b"(Ljava/lang/Class;)Z") self.isInstance = jenv.GetMethodID(jcls, b"isInstance", b"(Ljava/lang/Object;)Z") self.isAnnotation = jenv.GetMethodID(jcls, b"isAnnotation", b"()Z") self.isInterface = jenv.GetMethodID(jcls, b"isInterface", b"()Z") self.isEnum = jenv.GetMethodID(jcls, b"isEnum", b"()Z") self.isArray = jenv.GetMethodID(jcls, b"isArray", b"()Z") self.isAnonymousClass = jenv.GetMethodID(jcls, b"isAnonymousClass", b"()Z") self.isLocalClass = jenv.GetMethodID(jcls, b"isLocalClass", b"()Z") self.isMemberClass = jenv.GetMethodID(jcls, b"isMemberClass", b"()Z") self.isPrimitive = jenv.GetMethodID(jcls, b"isPrimitive", b"()Z") self.isSynthetic = jenv.GetMethodID(jcls, b"isSynthetic", b"()Z") self.newInstance = jenv.GetMethodID(jcls, b"newInstance", b"()Ljava/lang/Object;")
def initialize(self, jenv: jni.JNIEnv): with JFrame(jenv, 1): jcls = jenv.FindClass(b"java/lang/AutoCloseable") self.Class = jni.cast(jenv.NewGlobalRef(jcls), jni.jclass) self.close = jenv.GetMethodID(jcls, b"close", b"()V")
def initialize(self, jenv: jni.JNIEnv): with JFrame(jenv, 1): jcls = jenv.FindClass(b"java/lang/Comparable") self.Class = jni.cast(jenv.NewGlobalRef(jcls), jni.jclass) self.compareTo = jenv.GetMethodID(jcls, b"compareTo", b"(Ljava/lang/Object;)I")