private void ensurePreparedForInjection ( ) { if ( ! prepared ) { try { Class < ReflectiveInterceptor > clazz = ReflectiveInterceptor . class ; method_jlcgdfs = clazz . getDeclaredMethod ( "jlClassGetDeclaredFields" , Class . class ) ; method_jlcgdf = clazz . getDeclaredMethod ( "jlClassGetDeclaredField" , Class . class , String . class ) ; method_jlcgf = clazz . getDeclaredMethod ( "jlClassGetField" , Class . class , String . class ) ; method_jlcgdms = clazz . getDeclaredMethod ( "jlClassGetDeclaredMethods" , Class . class ) ; method_jlcgdm = clazz . getDeclaredMethod ( "jlClassGetDeclaredMethod" , Class . class , String . class , EMPTY_CLASS_ARRAY_CLAZZ ) ; method_jlcgm = clazz . getDeclaredMethod ( "jlClassGetMethod" , Class . class , String . class , EMPTY_CLASS_ARRAY_CLAZZ ) ; method_jlcgdc = clazz . getDeclaredMethod ( "jlClassGetDeclaredConstructor" , Class . class , EMPTY_CLASS_ARRAY_CLAZZ ) ; method_jlcgc = clazz . getDeclaredMethod ( "jlClassGetConstructor" , Class . class , EMPTY_CLASS_ARRAY_CLAZZ ) ; method_jlcgmods = clazz . getDeclaredMethod ( "jlClassGetModifiers" , Class . class ) ; method_jlcgms = clazz . getDeclaredMethod ( "jlClassGetMethods" , Class . class ) ; method_jlcgdcs = clazz . getDeclaredMethod ( "jlClassGetDeclaredConstructors" , Class . class ) ; method_jlrfg = clazz . getDeclaredMethod ( "jlrFieldGet" , Field . class , Object . class ) ; method_jlrfgl = clazz . getDeclaredMethod ( "jlrFieldGetLong" , Field . class , Object . class ) ; method_jlrmi = clazz . getDeclaredMethod ( "jlrMethodInvoke" , Method . class , Object . class , Object [ ] . class ) ; method_jloObjectStream_hasInitializerMethod = clazz . getDeclaredMethod ( "jlosHasStaticInitializer" , Class . class ) ; } catch ( NoSuchMethodException nsme ) { // cant happen, a-hahaha throw new Impossible ( nsme ) ; } prepared = true ; } }
Cache the Method objects that will be injected .