本文整理汇总了C#中IKVM.Internal.MethodWrapper.Link方法的典型用法代码示例。如果您正苦于以下问题:C# MethodWrapper.Link方法的具体用法?C# MethodWrapper.Link怎么用?C# MethodWrapper.Link使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IKVM.Internal.MethodWrapper
的用法示例。
在下文中一共展示了MethodWrapper.Link方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ProxyGenerator
static ProxyGenerator()
{
ClassLoaderWrapper bootClassLoader = ClassLoaderWrapper.GetBootstrapClassLoader();
proxyClass = bootClassLoader.LoadClassByDottedNameFast("java.lang.reflect.Proxy");
errorClass = bootClassLoader.LoadClassByDottedNameFast("java.lang.Error");
runtimeExceptionClass = bootClassLoader.LoadClassByDottedNameFast("java.lang.RuntimeException");
undeclaredThrowableExceptionConstructor = bootClassLoader.LoadClassByDottedNameFast("java.lang.reflect.UndeclaredThrowableException").GetMethodWrapper("<init>", "(Ljava.lang.Throwable;)V", false);
undeclaredThrowableExceptionConstructor.Link();
invocationHandlerField = proxyClass.GetFieldWrapper("h", "Ljava.lang.reflect.InvocationHandler;");
invocationHandlerField.Link();
javaLangReflectMethod = bootClassLoader.LoadClassByDottedNameFast("java.lang.reflect.Method");
javaLangNoSuchMethodException = bootClassLoader.LoadClassByDottedNameFast("java.lang.NoSuchMethodException");
javaLangNoClassDefFoundErrorConstructor = bootClassLoader.LoadClassByDottedNameFast("java.lang.NoClassDefFoundError").GetMethodWrapper("<init>", "(Ljava.lang.String;)V", false);
javaLangNoClassDefFoundErrorConstructor.Link();
javaLangThrowable_getMessage = bootClassLoader.LoadClassByDottedNameFast("java.lang.Throwable").GetMethodWrapper("getMessage", "()Ljava.lang.String;", false);
javaLangThrowable_getMessage.Link();
javaLangClass_getMethod = CoreClasses.java.lang.Class.Wrapper.GetMethodWrapper("getMethod", "(Ljava.lang.String;[Ljava.lang.Class;)Ljava.lang.reflect.Method;", false);
javaLangClass_getMethod.Link();
invocationHandlerClass = bootClassLoader.LoadClassByDottedNameFast("java.lang.reflect.InvocationHandler");
invokeMethod = invocationHandlerClass.GetMethodWrapper("invoke", "(Ljava.lang.Object;Ljava.lang.reflect.Method;[Ljava.lang.Object;)Ljava.lang.Object;", false);
proxyConstructor = proxyClass.GetMethodWrapper("<init>", "(Ljava.lang.reflect.InvocationHandler;)V", false);
proxyConstructor.Link();
hashCodeMethod = CoreClasses.java.lang.Object.Wrapper.GetMethodWrapper("hashCode", "()I", false);
equalsMethod = CoreClasses.java.lang.Object.Wrapper.GetMethodWrapper("equals", "(Ljava.lang.Object;)Z", false);
toStringMethod = CoreClasses.java.lang.Object.Wrapper.GetMethodWrapper("toString", "()Ljava.lang.String;", false);
}
示例2: Boxer
static Boxer()
{
ClassLoaderWrapper bootClassLoader = ClassLoaderWrapper.GetBootstrapClassLoader();
javaLangByte = bootClassLoader.LoadClassByDottedNameFast("java.lang.Byte");
byteValue = javaLangByte.GetMethodWrapper("byteValue", "()B", false);
byteValue.Link();
valueOfByte = javaLangByte.GetMethodWrapper("valueOf", "(B)Ljava.lang.Byte;", false);
valueOfByte.Link();
javaLangBoolean = bootClassLoader.LoadClassByDottedNameFast("java.lang.Boolean");
booleanValue = javaLangBoolean.GetMethodWrapper("booleanValue", "()Z", false);
booleanValue.Link();
valueOfBoolean = javaLangBoolean.GetMethodWrapper("valueOf", "(Z)Ljava.lang.Boolean;", false);
valueOfBoolean.Link();
javaLangShort = bootClassLoader.LoadClassByDottedNameFast("java.lang.Short");
shortValue = javaLangShort.GetMethodWrapper("shortValue", "()S", false);
shortValue.Link();
valueOfShort = javaLangShort.GetMethodWrapper("valueOf", "(S)Ljava.lang.Short;", false);
valueOfShort.Link();
javaLangCharacter = bootClassLoader.LoadClassByDottedNameFast("java.lang.Character");
charValue = javaLangCharacter.GetMethodWrapper("charValue", "()C", false);
charValue.Link();
valueOfCharacter = javaLangCharacter.GetMethodWrapper("valueOf", "(C)Ljava.lang.Character;", false);
valueOfCharacter.Link();
javaLangInteger = bootClassLoader.LoadClassByDottedNameFast("java.lang.Integer");
intValue = javaLangInteger.GetMethodWrapper("intValue", "()I", false);
intValue.Link();
valueOfInteger = javaLangInteger.GetMethodWrapper("valueOf", "(I)Ljava.lang.Integer;", false);
valueOfInteger.Link();
javaLangFloat = bootClassLoader.LoadClassByDottedNameFast("java.lang.Float");
floatValue = javaLangFloat.GetMethodWrapper("floatValue", "()F", false);
floatValue.Link();
valueOfFloat = javaLangFloat.GetMethodWrapper("valueOf", "(F)Ljava.lang.Float;", false);
valueOfFloat.Link();
javaLangLong = bootClassLoader.LoadClassByDottedNameFast("java.lang.Long");
longValue = javaLangLong.GetMethodWrapper("longValue", "()J", false);
longValue.Link();
valueOfLong = javaLangLong.GetMethodWrapper("valueOf", "(J)Ljava.lang.Long;", false);
valueOfLong.Link();
javaLangDouble = bootClassLoader.LoadClassByDottedNameFast("java.lang.Double");
doubleValue = javaLangDouble.GetMethodWrapper("doubleValue", "()D", false);
doubleValue.Link();
valueOfDouble = javaLangDouble.GetMethodWrapper("valueOf", "(D)Ljava.lang.Double;", false);
valueOfDouble.Link();
}