internal static MethodWrapper FromExecutable(java.lang.reflect.Executable executable)
		{
#if FIRST_PASS
			return null;
#else
			return TypeWrapper.FromClass(executable.getDeclaringClass()).GetMethods()[executable._slot()];
#endif
		}
Exemplo n.º 2
0
 internal static MethodWrapper FromMethod(java.lang.reflect.Method method)
 {
     #if FIRST_PASS
     return null;
     #else
     return TypeWrapper.FromClass(method.getDeclaringClass()).GetMethods()[method._slot()];
     #endif
 }
		internal static FieldWrapper FromField(java.lang.reflect.Field field)
		{
#if FIRST_PASS
			return null;
#else
			int slot = field._slot();
			if (slot == -1)
			{
				// it's a Field created by Unsafe.objectFieldOffset(Class,String) so we must resolve based on the name
				foreach (FieldWrapper fw in TypeWrapper.FromClass(field.getDeclaringClass()).GetFields())
				{
					if (fw.Name == field.getName())
					{
						return fw;
					}
				}
			}
			return TypeWrapper.FromClass(field.getDeclaringClass()).GetFields()[slot];
#endif
		}
Exemplo n.º 4
0
 internal static MethodWrapper FromConstructor(java.lang.reflect.Constructor constructor)
 {
     #if FIRST_PASS
     return null;
     #else
     return TypeWrapper.FromClass(constructor.getDeclaringClass()).GetMethods()[constructor._slot()];
     #endif
 }