@SuppressWarnings({ "rawtypes", "unchecked" })
	public static Object jlrMethodInvoke(Method method, Object target, Object... params)
			throws IllegalArgumentException,
			IllegalAccessException, InvocationTargetException {
		//		System.out.println("> jlrMethodInvoke:method=" + method + " target=" + target + " params=" + toString(params));
		Class declaringClass = method.getDeclaringClass();
		if (declaringClass == Class.class) {
			String mname = method.getName();
			try {
				if (mname.equals("getFields")) {
					return jlClassGetFields((Class) target);
				}
				else if (mname.equals("getDeclaredFields")) {
					return jlClassGetDeclaredFields((Class) target);
				}
				else if (mname.equals("getDeclaredField")) {
					return jlClassGetDeclaredField((Class) target, (String) params[0]);
				}
				else if (mname.equals("getField")) {
					return jlClassGetField((Class) target, (String) params[0]);
				}
				else if (mname.equals("getConstructors")) {
					return jlClassGetConstructors((Class) target);
				}
				else if (mname.equals("getDeclaredConstructors")) {
					return jlClassGetDeclaredConstructors((Class) target);
				}
				else if (mname.equals("getDeclaredMethod")) {
					return jlClassGetDeclaredMethod((Class) target, (String) params[0], (Class[]) params[1]);
				}
				else if (mname.equals("getDeclaredMethods")) {
					return jlClassGetDeclaredMethods((Class) target);
				}
				else if (mname.equals("getMethod")) {
					return jlClassGetMethod((Class) target, (String) params[0], (Class[]) params[1]);
				}
				else if (mname.equals("getMethods")) {
					return jlClassGetMethods((Class) target);
				}
				else if (mname.equals("getConstructor")) {
					return jlClassGetConstructor((Class) target, (Class[]) params[0]);
				}
				else if (mname.equals("getDeclaredConstructor")) {
					return jlClassGetDeclaredConstructor((Class) target, (Class[]) params[0]);
				}
				else if (mname.equals("getModifiers")) {
					return jlClassGetModifiers((Class) target);
				}
				else if (mname.equals("isAnnotationPresent")) {
					return jlClassIsAnnotationPresent((Class) target, (Class<? extends Annotation>) params[0]);
				}
				else if (mname.equals("newInstance")) {
					return jlClassNewInstance((Class) target);
				}
				else if (mname.equals("getDeclaredAnnotations")) {
					return jlClassGetDeclaredAnnotations((Class) target);
				}
				else if (mname.equals("getAnnotation")) {
					return jlClassGetAnnotation((Class) target, (Class) params[0]);
				}
				else if (mname.equals("getAnnotations")) {
					return jlClassGetAnnotations((Class) target);
				}
			}
			catch (NoSuchMethodException nsme) {
				throw new InvocationTargetException(nsme);
			}
			catch (NoSuchFieldException nsfe) {
				throw new InvocationTargetException(nsfe);
			}
			catch (InstantiationException ie) {
				throw new InvocationTargetException(ie);
			}
		}
		else if (declaringClass == Method.class) {
			String mname = method.getName();
			if (mname.equals("invoke")) {
				return jlrMethodInvoke((Method) target, params[0], (Object[]) params[1]);
			}
			else if (mname.equals("getAnnotation")) {
				return jlrMethodGetAnnotation((Method) target, (Class) params[0]);
			}
			else if (mname.equals("getAnnotations")) {
				return jlrMethodGetAnnotations((Method) target);
			}
			else if (mname.equals("getDeclaredAnnotations")) {
				return jlrMethodGetDeclaredAnnotations((Method) target);
			}
			else if (mname.equals("getParameterAnnotations")) {
				return jlrMethodGetParameterAnnotations((Method) target);
			}
			else if (mname.equals("isAnnotationPresent")) {
				return jlrMethodIsAnnotationPresent((Method) target, (Class) params[0]);
			}
		}
		else if (declaringClass == Constructor.class) {
			String mname = method.getName();
			try {
				if (mname.equals("getAnnotation")) {
					return jlrConstructorGetAnnotation((Constructor) target, (Class) params[0]);
				}
				else if (mname.equals("newInstance")) {
					return jlrConstructorNewInstance((Constructor) target, (Object[]) params[0]);
				}
				else if (mname.equals("getAnnotations")) {
					return jlrConstructorGetAnnotations((Constructor) target);
				}
				else if (mname.equals("getDeclaredAnnotations")) {
					return jlrConstructorGetDeclaredAnnotations((Constructor) target);
				}
				else if (mname.equals("isAnnotationPresent")) {
					return jlrConstructorIsAnnotationPresent((Constructor) target, (Class) params[0]);
				}
				else if (mname.equals("getParameterAnnotations")) {
					return jlrConstructorGetParameterAnnotations((Constructor) target);
				}
			}
			catch (InstantiationException ie) {
				throw new InvocationTargetException(ie);
			}
			catch (NoSuchMethodException nsme) {
				throw new InvocationTargetException(nsme);
			}
		}
		else if (declaringClass == Field.class) {
			String mname = method.getName();
			if (mname.equals("set")) {
				jlrFieldSet((Field) target, params[0], params[1]);
				return null;
			}
			else if (mname.equals("setBoolean")) {
				jlrFieldSetBoolean((Field) target, params[0], (Boolean) params[1]);
				return null;
			}
			else if (mname.equals("setByte")) {
				jlrFieldSetByte((Field) target, params[0], (Byte) params[1]);
				return null;
			}
			else if (mname.equals("setChar")) {
				jlrFieldSetChar((Field) target, params[0], (Character) params[1]);
				return null;
			}
			else if (mname.equals("setFloat")) {
				jlrFieldSetFloat((Field) target, params[0], (Float) params[1]);
				return null;
			}
			else if (mname.equals("setShort")) {
				jlrFieldSetShort((Field) target, params[0], (Short) params[1]);
				return null;
			}
			else if (mname.equals("setLong")) {
				jlrFieldSetLong((Field) target, params[0], (Long) params[1]);
				return null;
			}
			else if (mname.equals("setDouble")) {
				jlrFieldSetDouble((Field) target, params[0], (Double) params[1]);
				return null;
			}
			else if (mname.equals("setInt")) {
				jlrFieldSetInt((Field) target, params[0], (Integer) params[1]);
				return null;
			}
			else if (mname.equals("get")) {
				return jlrFieldGet((Field) target, params[0]);
			}
			else if (mname.equals("getByte")) {
				return jlrFieldGetByte((Field) target, params[0]);
			}
			else if (mname.equals("getChar")) {
				return jlrFieldGetChar((Field) target, params[0]);
			}
			else if (mname.equals("getDouble")) {
				return jlrFieldGetDouble((Field) target, params[0]);
			}
			else if (mname.equals("getBoolean")) {
				return jlrFieldGetBoolean((Field) target, params[0]);
			}
			else if (mname.equals("getLong")) {
				return jlrFieldGetLong((Field) target, params[0]);
			}
			else if (mname.equals("getFloat")) {
				return jlrFieldGetFloat((Field) target, params[0]);
			}
			else if (mname.equals("getInt")) {
				return jlrFieldGetInt((Field) target, params[0]);
			}
			else if (mname.equals("getShort")) {
				return jlrFieldGetShort((Field) target, params[0]);
			}
			else if (mname.equals("getAnnotations")) {
				return jlrFieldGetAnnotations((Field) target);
			}
			else if (mname.equals("getDeclaredAnnotations")) {
				return jlrFieldGetDeclaredAnnotations((Field) target);
			}
			else if (mname.equals("isAnnotationPresent")) {
				return jlrFieldIsAnnotationPresent((Field) target, (Class) params[0]);
			}
			else if (mname.equals("getAnnotation")) {
				return jlrFieldGetAnnotation((Field) target, (Class) params[0]);
			}
		}
		else if (declaringClass == AccessibleObject.class) {
			String mname = method.getName();
			if (mname.equals("isAnnotationPresent")) {
				if (target instanceof Constructor) {
					// TODO what about null target - how should things go bang?
					return jlrConstructorIsAnnotationPresent((Constructor) target, (Class) params[0]);
				}
				else if (target instanceof Method) {
					return jlrMethodIsAnnotationPresent((Method) target, (Class) params[0]);
				}
				else if (target instanceof Field) {
					return jlrFieldIsAnnotationPresent((Field) target, (Class) params[0]);
				}
			}
			else if (mname.equals("getAnnotations")) {
				if (target instanceof Constructor) {
					return jlrConstructorGetAnnotations((Constructor) target);
				}
				else if (target instanceof Method) {
					return jlrMethodGetAnnotations((Method) target);
				}
				else if (target instanceof Field) {
					return jlrFieldGetAnnotations((Field) target);
				}
			}
			else if (mname.equals("getDeclaredAnnotations")) {
				if (target instanceof Constructor) {
					return jlrConstructorGetDeclaredAnnotations((Constructor) target);
				}
				else if (target instanceof Method) {
					return jlrMethodGetDeclaredAnnotations((Method) target);
				}
				else if (target instanceof Field) {
					return jlrFieldGetDeclaredAnnotations((Field) target);
				}
			}
			else if (mname.equals("getAnnotation")) {
				if (target instanceof Constructor) {
					return jlrConstructorGetAnnotation((Constructor) target, (Class) params[0]);
				}
				else if (target instanceof Method) {
					return jlrMethodGetAnnotation((Method) target, (Class) params[0]);
				}
				else if (target instanceof Field) {
					return jlrFieldGetAnnotation((Field) target, (Class) params[0]);
				}
			}
		}
		else if (declaringClass == AnnotatedElement.class) {
			String mname = method.getName();
			if (mname.equals("isAnnotationPresent")) {
				if (target instanceof Constructor) {
					// TODO what about null target - how should things go bang?
					return jlrConstructorIsAnnotationPresent((Constructor) target, (Class) params[0]);
				}
				else if (target instanceof Method) {
					return jlrMethodIsAnnotationPresent((Method) target, (Class) params[0]);
				}
				else if (target instanceof Field) {
					return jlrFieldIsAnnotationPresent((Field) target, (Class) params[0]);
				}
			}
			else if (mname.equals("getAnnotations")) {
				if (target instanceof Constructor) {
					return jlrConstructorGetAnnotations((Constructor) target);
				}
				else if (target instanceof Method) {
					return jlrMethodGetAnnotations((Method) target);
				}
				else if (target instanceof Field) {
					return jlrFieldGetAnnotations((Field) target);
				}
			}
			else if (mname.equals("getDeclaredAnnotations")) {
				if (target instanceof Constructor) {
					return jlrConstructorGetDeclaredAnnotations((Constructor) target);
				}
				else if (target instanceof Method) {
					return jlrMethodGetDeclaredAnnotations((Method) target);
				}
				else if (target instanceof Field) {
					return jlrFieldGetDeclaredAnnotations((Field) target);
				}
			}
			else if (mname.equals("getAnnotation")) {
				if (target instanceof Constructor) {
					return jlrConstructorGetAnnotation((Constructor) target, (Class) params[0]);
				}
				else if (target instanceof Method) {
					return jlrMethodGetAnnotation((Method) target, (Class) params[0]);
				}
				else if (target instanceof Field) {
					return jlrFieldGetAnnotation((Field) target, (Class) params[0]);
				}
			}
		}

		// Even though we tinker with the visibility of methods, we don't damage private ones (which would really cause chaos if we tried
		// to allow the JVM to do the dispatch).  That means this should be OK:
		if (TypeRegistry.nothingReloaded) {
			method = asAccessibleMethod(null, method, target, true);
			return method.invoke(target, params);
		}
		ReloadableType declaringType = getRType(declaringClass);
		if (declaringType == null) {
			//Not reloadable...
			method = asAccessibleMethod(declaringType, method, target, true);
			return method.invoke(target, params);
		}
		else {
			//Reloadable...
			asAccessibleMethod(declaringType, method, target, false);
			int mods = method.getModifiers();
			Invoker invoker;
			if ((mods & (Modifier.STATIC | Modifier.PRIVATE)) != 0) {
				//These methods are dispatched statically
				MethodProvider methods = MethodProvider.create(declaringType);
				invoker = methods.staticLookup(mods, method.getName(), Type.getMethodDescriptor(method));
			}
			else {
				//These methods are dispatched dynamically
				ReloadableType targetType = getRType(target.getClass()); //NPE possible but is what should happen here!
				if (targetType == null) {
					if (GlobalConfiguration.verboseMode) {
						System.out.println("UNEXPECTED: Subtype '"
								+ target.getClass().getName()
								+ "' of reloadable type "
								+ method.getDeclaringClass().getName()
								+ " is not reloadable: may not see changes reloaded in this hierarchy");
					}
					method = asAccessibleMethod(declaringType, method, target, true);
					return method.invoke(target, params);
				}
				MethodProvider methods = MethodProvider.create(targetType); //use target not declaring type for Dynamic lookkup
				invoker = methods.dynamicLookup(mods, method.getName(), Type.getMethodDescriptor(method));
			}
			return invoker.invoke(target, params);
		}
	}
@ SuppressWarnings ( { "rawtypes" , "unchecked" } ) public static Object jlrMethodInvoke ( Method method , Object target , Object ... params ) throws IllegalArgumentException , IllegalAccessException , InvocationTargetException { Class declaringClass = method . getDeclaringClass ( ) ; if ( declaringClass == Class . class ) { String mname = method . getName ( ) ; try { if ( mname . equals ( "getFields" ) ) { return jlClassGetFields ( ( Class ) target ) ; } else if ( mname . equals ( "getDeclaredFields" ) ) { return jlClassGetDeclaredFields ( ( Class ) target ) ; } else if ( mname . equals ( "getDeclaredField" ) ) { return jlClassGetDeclaredField ( ( Class ) target , ( String ) params [ 0 ] ) ; } else if ( mname . equals ( "getField" ) ) { return jlClassGetField ( ( Class ) target , ( String ) params [ 0 ] ) ; } else if ( mname . equals ( "getConstructors" ) ) { return jlClassGetConstructors ( ( Class ) target ) ; } else if ( mname . equals ( "getDeclaredConstructors" ) ) { return jlClassGetDeclaredConstructors ( ( Class ) target ) ; } else if ( mname . equals ( "getDeclaredMethod" ) ) { return jlClassGetDeclaredMethod ( ( Class ) target , ( String ) params [ 0 ] , ( Class [ ] ) params [ 1 ] ) ; } else if ( mname . equals ( "getDeclaredMethods" ) ) { return jlClassGetDeclaredMethods ( ( Class ) target ) ; } else if ( mname . equals ( "getMethod" ) ) { return jlClassGetMethod ( ( Class ) target , ( String ) params [ 0 ] , ( Class [ ] ) params [ 1 ] ) ; } else if ( mname . equals ( "getMethods" ) ) { return jlClassGetMethods ( ( Class ) target ) ; } else if ( mname . equals ( "getConstructor" ) ) { return jlClassGetConstructor ( ( Class ) target , ( Class [ ] ) params [ 0 ] ) ; } else if ( mname . equals ( "getDeclaredConstructor" ) ) { return jlClassGetDeclaredConstructor ( ( Class ) target , ( Class [ ] ) params [ 0 ] ) ; } else if ( mname . equals ( "getModifiers" ) ) { return jlClassGetModifiers ( ( Class ) target ) ; } else if ( mname . equals ( "isAnnotationPresent" ) ) { return jlClassIsAnnotationPresent ( ( Class ) target , ( Class < ? extends Annotation > ) params [ 0 ] ) ; } else if ( mname . equals ( "newInstance" ) ) { return jlClassNewInstance ( ( Class ) target ) ; } else if ( mname . equals ( "getDeclaredAnnotations" ) ) { return jlClassGetDeclaredAnnotations ( ( Class ) target ) ; } else if ( mname . equals ( "getAnnotation" ) ) { return jlClassGetAnnotation ( ( Class ) target , ( Class ) params [ 0 ] ) ; } else if ( mname . equals ( "getAnnotations" ) ) { return jlClassGetAnnotations ( ( Class ) target ) ; } } catch ( NoSuchMethodException nsme ) { throw new InvocationTargetException ( nsme ) ; } catch ( NoSuchFieldException nsfe ) { throw new InvocationTargetException ( nsfe ) ; } catch ( InstantiationException ie ) { throw new InvocationTargetException ( ie ) ; } } else if ( declaringClass == Method . class ) { String mname = method . getName ( ) ; if ( mname . equals ( "invoke" ) ) { return jlrMethodInvoke ( ( Method ) target , params [ 0 ] , ( Object [ ] ) params [ 1 ] ) ; } else if ( mname . equals ( "getAnnotation" ) ) { return jlrMethodGetAnnotation ( ( Method ) target , ( Class ) params [ 0 ] ) ; } else if ( mname . equals ( "getAnnotations" ) ) { return jlrMethodGetAnnotations ( ( Method ) target ) ; } else if ( mname . equals ( "getDeclaredAnnotations" ) ) { return jlrMethodGetDeclaredAnnotations ( ( Method ) target ) ; } else if ( mname . equals ( "getParameterAnnotations" ) ) { return jlrMethodGetParameterAnnotations ( ( Method ) target ) ; } else if ( mname . equals ( "isAnnotationPresent" ) ) { return jlrMethodIsAnnotationPresent ( ( Method ) target , ( Class ) params [ 0 ] ) ; } } else if ( declaringClass == Constructor . class ) { String mname = method . getName ( ) ; try { if ( mname . equals ( "getAnnotation" ) ) { return jlrConstructorGetAnnotation ( ( Constructor ) target , ( Class ) params [ 0 ] ) ; } else if ( mname . equals ( "newInstance" ) ) { return jlrConstructorNewInstance ( ( Constructor ) target , ( Object [ ] ) params [ 0 ] ) ; } else if ( mname . equals ( "getAnnotations" ) ) { return jlrConstructorGetAnnotations ( ( Constructor ) target ) ; } else if ( mname . equals ( "getDeclaredAnnotations" ) ) { return jlrConstructorGetDeclaredAnnotations ( ( Constructor ) target ) ; } else if ( mname . equals ( "isAnnotationPresent" ) ) { return jlrConstructorIsAnnotationPresent ( ( Constructor ) target , ( Class ) params [ 0 ] ) ; } else if ( mname . equals ( "getParameterAnnotations" ) ) { return jlrConstructorGetParameterAnnotations ( ( Constructor ) target ) ; } } catch ( InstantiationException ie ) { throw new InvocationTargetException ( ie ) ; } catch ( NoSuchMethodException nsme ) { throw new InvocationTargetException ( nsme ) ; } } else if ( declaringClass == Field . class ) { String mname = method . getName ( ) ; if ( mname . equals ( "set" ) ) { jlrFieldSet ( ( Field ) target , params [ 0 ] , params [ 1 ] ) ; return null ; } else if ( mname . equals ( "setBoolean" ) ) { jlrFieldSetBoolean ( ( Field ) target , params [ 0 ] , ( Boolean ) params [ 1 ] ) ; return null ; } else if ( mname . equals ( "setByte" ) ) { jlrFieldSetByte ( ( Field ) target , params [ 0 ] , ( Byte ) params [ 1 ] ) ; return null ; } else if ( mname . equals ( "setChar" ) ) { jlrFieldSetChar ( ( Field ) target , params [ 0 ] , ( Character ) params [ 1 ] ) ; return null ; } else if ( mname . equals ( "setFloat" ) ) { jlrFieldSetFloat ( ( Field ) target , params [ 0 ] , ( Float ) params [ 1 ] ) ; return null ; } else if ( mname . equals ( "setShort" ) ) { jlrFieldSetShort ( ( Field ) target , params [ 0 ] , ( Short ) params [ 1 ] ) ; return null ; } else if ( mname . equals ( "setLong" ) ) { jlrFieldSetLong ( ( Field ) target , params [ 0 ] , ( Long ) params [ 1 ] ) ; return null ; } else if ( mname . equals ( "setDouble" ) ) { jlrFieldSetDouble ( ( Field ) target , params [ 0 ] , ( Double ) params [ 1 ] ) ; return null ; } else if ( mname . equals ( "setInt" ) ) { jlrFieldSetInt ( ( Field ) target , params [ 0 ] , ( Integer ) params [ 1 ] ) ; return null ; } else if ( mname . equals ( "get" ) ) { return jlrFieldGet ( ( Field ) target , params [ 0 ] ) ; } else if ( mname . equals ( "getByte" ) ) { return jlrFieldGetByte ( ( Field ) target , params [ 0 ] ) ; } else if ( mname . equals ( "getChar" ) ) { return jlrFieldGetChar ( ( Field ) target , params [ 0 ] ) ; } else if ( mname . equals ( "getDouble" ) ) { return jlrFieldGetDouble ( ( Field ) target , params [ 0 ] ) ; } else if ( mname . equals ( "getBoolean" ) ) { return jlrFieldGetBoolean ( ( Field ) target , params [ 0 ] ) ; } else if ( mname . equals ( "getLong" ) ) { return jlrFieldGetLong ( ( Field ) target , params [ 0 ] ) ; } else if ( mname . equals ( "getFloat" ) ) { return jlrFieldGetFloat ( ( Field ) target , params [ 0 ] ) ; } else if ( mname . equals ( "getInt" ) ) { return jlrFieldGetInt ( ( Field ) target , params [ 0 ] ) ; } else if ( mname . equals ( "getShort" ) ) { return jlrFieldGetShort ( ( Field ) target , params [ 0 ] ) ; } else if ( mname . equals ( "getAnnotations" ) ) { return jlrFieldGetAnnotations ( ( Field ) target ) ; } else if ( mname . equals ( "getDeclaredAnnotations" ) ) { return jlrFieldGetDeclaredAnnotations ( ( Field ) target ) ; } else if ( mname . equals ( "isAnnotationPresent" ) ) { return jlrFieldIsAnnotationPresent ( ( Field ) target , ( Class ) params [ 0 ] ) ; } else if ( mname . equals ( "getAnnotation" ) ) { return jlrFieldGetAnnotation ( ( Field ) target , ( Class ) params [ 0 ] ) ; } } else if ( declaringClass == AccessibleObject . class ) { String mname = method . getName ( ) ; if ( mname . equals ( "isAnnotationPresent" ) ) { if ( target instanceof Constructor ) { return jlrConstructorIsAnnotationPresent ( ( Constructor ) target , ( Class ) params [ 0 ] ) ; } else if ( target instanceof Method ) { return jlrMethodIsAnnotationPresent ( ( Method ) target , ( Class ) params [ 0 ] ) ; } else if ( target instanceof Field ) { return jlrFieldIsAnnotationPresent ( ( Field ) target , ( Class ) params [ 0 ] ) ; } } else if ( mname . equals ( "getAnnotations" ) ) { if ( target instanceof Constructor ) { return jlrConstructorGetAnnotations ( ( Constructor ) target ) ; } else if ( target instanceof Method ) { return jlrMethodGetAnnotations ( ( Method ) target ) ; } else if ( target instanceof Field ) { return jlrFieldGetAnnotations ( ( Field ) target ) ; } } else if ( mname . equals ( "getDeclaredAnnotations" ) ) { if ( target instanceof Constructor ) { return jlrConstructorGetDeclaredAnnotations ( ( Constructor ) target ) ; } else if ( target instanceof Method ) { return jlrMethodGetDeclaredAnnotations ( ( Method ) target ) ; } else if ( target instanceof Field ) { return jlrFieldGetDeclaredAnnotations ( ( Field ) target ) ; } } else if ( mname . equals ( "getAnnotation" ) ) { if ( target instanceof Constructor ) { return jlrConstructorGetAnnotation ( ( Constructor ) target , ( Class ) params [ 0 ] ) ; } else if ( target instanceof Method ) { return jlrMethodGetAnnotation ( ( Method ) target , ( Class ) params [ 0 ] ) ; } else if ( target instanceof Field ) { return jlrFieldGetAnnotation ( ( Field ) target , ( Class ) params [ 0 ] ) ; } } } else if ( declaringClass == AnnotatedElement . class ) { String mname = method . getName ( ) ; if ( mname . equals ( "isAnnotationPresent" ) ) { if ( target instanceof Constructor ) { return jlrConstructorIsAnnotationPresent ( ( Constructor ) target , ( Class ) params [ 0 ] ) ; } else if ( target instanceof Method ) { return jlrMethodIsAnnotationPresent ( ( Method ) target , ( Class ) params [ 0 ] ) ; } else if ( target instanceof Field ) { return jlrFieldIsAnnotationPresent ( ( Field ) target , ( Class ) params [ 0 ] ) ; } } else if ( mname . equals ( "getAnnotations" ) ) { if ( target instanceof Constructor ) { return jlrConstructorGetAnnotations ( ( Constructor ) target ) ; } else if ( target instanceof Method ) { return jlrMethodGetAnnotations ( ( Method ) target ) ; } else if ( target instanceof Field ) { return jlrFieldGetAnnotations ( ( Field ) target ) ; } } else if ( mname . equals ( "getDeclaredAnnotations" ) ) { if ( target instanceof Constructor ) { return jlrConstructorGetDeclaredAnnotations ( ( Constructor ) target ) ; } else if ( target instanceof Method ) { return jlrMethodGetDeclaredAnnotations ( ( Method ) target ) ; } else if ( target instanceof Field ) { return jlrFieldGetDeclaredAnnotations ( ( Field ) target ) ; } } else if ( mname . equals ( "getAnnotation" ) ) { if ( target instanceof Constructor ) { return jlrConstructorGetAnnotation ( ( Constructor ) target , ( Class ) params [ 0 ] ) ; } else if ( target instanceof Method ) { return jlrMethodGetAnnotation ( ( Method ) target , ( Class ) params [ 0 ] ) ; } else if ( target instanceof Field ) { return jlrFieldGetAnnotation ( ( Field ) target , ( Class ) params [ 0 ] ) ; } } } if ( TypeRegistry . nothingReloaded ) { method = asAccessibleMethod ( null , method , target , true ) ; return method . invoke ( target , params ) ; } ReloadableType declaringType = getRType ( declaringClass ) ; if ( declaringType == null ) { method = asAccessibleMethod ( declaringType , method , target , true ) ; return method . invoke ( target , params ) ; } else { asAccessibleMethod ( declaringType , method , target , false ) ; int mods = method . getModifiers ( ) ; Invoker invoker ; if ( ( mods & ( Modifier . STATIC | Modifier . PRIVATE ) ) != 0 ) { MethodProvider methods = MethodProvider . create ( declaringType ) ; invoker = methods . staticLookup ( mods , method . getName ( ) , Type . getMethodDescriptor ( method ) ) ; } else { ReloadableType targetType = getRType ( target . getClass ( ) ) ; if ( targetType == null ) { if ( GlobalConfiguration . verboseMode ) { System . out . println ( "UNEXPECTED: Subtype '" + target . getClass ( ) . getName ( ) + "' of reloadable type " + method . getDeclaringClass ( ) . getName ( ) + " is not reloadable: may not see changes reloaded in this hierarchy" ) ; } method = asAccessibleMethod ( declaringType , method , target , true ) ; return method . invoke ( target , params ) ; } MethodProvider methods = MethodProvider . create ( targetType ) ; invoker = methods . dynamicLookup ( mods , method . getName ( ) , Type . getMethodDescriptor ( method ) ) ; } return invoker . invoke ( target , params ) ; } }
}