IKVM11  11
Java SE 11 Virtual Machine for .NET
Loading...
Searching...
No Matches
IKVM.Tools.Importer.ProxyGenerator Class Reference

Public Member Functions

 ProxyGenerator (RuntimeContext context)
 Initializes the static instance.
 

Detailed Description

Definition at line 37 of file Proxy.cs.

Constructor & Destructor Documentation

◆ ProxyGenerator()

IKVM.Tools.Importer.ProxyGenerator.ProxyGenerator ( RuntimeContext context)

Initializes the static instance.

Definition at line 61 of file Proxy.cs.

62 {
63 this.context = context;
64
65 var bootClassLoader = context.ClassLoaderFactory.GetBootstrapClassLoader();
66 proxyClass = bootClassLoader.TryLoadClassByName("java.lang.reflect.Proxy");
67 errorClass = bootClassLoader.TryLoadClassByName("java.lang.Error");
68 runtimeExceptionClass = bootClassLoader.TryLoadClassByName("java.lang.RuntimeException");
69 undeclaredThrowableExceptionConstructor = bootClassLoader.TryLoadClassByName("java.lang.reflect.UndeclaredThrowableException").GetMethod("<init>", "(Ljava.lang.Throwable;)V", false);
70 undeclaredThrowableExceptionConstructor.Link();
71 invocationHandlerField = proxyClass.GetFieldWrapper("h", "Ljava.lang.reflect.InvocationHandler;");
72 invocationHandlerField.Link();
73 javaLangReflectMethod = bootClassLoader.TryLoadClassByName("java.lang.reflect.Method");
74 javaLangNoSuchMethodException = bootClassLoader.TryLoadClassByName("java.lang.NoSuchMethodException");
75 javaLangNoClassDefFoundErrorConstructor = bootClassLoader.TryLoadClassByName("java.lang.NoClassDefFoundError").GetMethod("<init>", "(Ljava.lang.String;)V", false);
76 javaLangNoClassDefFoundErrorConstructor.Link();
77 javaLangThrowable_getMessage = bootClassLoader.TryLoadClassByName("java.lang.Throwable").GetMethod("getMessage", "()Ljava.lang.String;", false);
78 javaLangThrowable_getMessage.Link();
79 javaLangClass_getMethod = context.JavaBase.TypeOfJavaLangClass.GetMethod("getMethod", "(Ljava.lang.String;[Ljava.lang.Class;)Ljava.lang.reflect.Method;", false);
80 javaLangClass_getMethod.Link();
81 invocationHandlerClass = bootClassLoader.TryLoadClassByName("java.lang.reflect.InvocationHandler");
82 invokeMethod = invocationHandlerClass.GetMethod("invoke", "(Ljava.lang.Object;Ljava.lang.reflect.Method;[Ljava.lang.Object;)Ljava.lang.Object;", false);
83 proxyConstructor = proxyClass.GetMethod("<init>", "(Ljava.lang.reflect.InvocationHandler;)V", false);
84 proxyConstructor.Link();
85 hashCodeMethod = context.JavaBase.TypeOfJavaLangObject.GetMethod("hashCode", "()I", false);
86 equalsMethod = context.JavaBase.TypeOfJavaLangObject.GetMethod("equals", "(Ljava.lang.Object;)Z", false);
87 toStringMethod = context.JavaBase.TypeOfJavaLangObject.GetMethod("toString", "()Ljava.lang.String;", false);
88 }
CoreClasses JavaBase
Gets the CoreClasses associated with this instance of the runtime.
RuntimeClassLoaderFactory ClassLoaderFactory
Gets the RuntimeClassLoaderFactory associated with this instance of the runtime.

The documentation for this class was generated from the following file: