@ Override public Method createJavaMethod ( ) { Class < ? > clazz = rtype . getClazz ( ) ; String name = methodMember . getName ( ) ; String methodDescriptor = methodMember . getDescriptor ( ) ; ClassLoader classLoader = rtype . getTypeRegistry ( ) . getClassLoader ( ) ; try { Class < ? > [ ] params = Utils . toParamClasses ( methodDescriptor , classLoader ) ; Class < ? > returnType = Utils . toClass ( Type . getReturnType ( methodDescriptor ) , classLoader ) ; Class < ? > [ ] exceptions = Utils . slashedNamesToClasses ( methodMember . getExceptions ( ) , classLoader ) ; return JVM . newMethod ( clazz , name , params , returnType , exceptions , methodMember . getModifiers ( ) , methodMember . getGenericSignature ( ) ) ; } catch ( ClassNotFoundException e ) { throw new IllegalStateException ( "Couldn't create j.l.r.Method for " + clazz . getName ( ) + "." + methodDescriptor , e ) ; } }
Create a mock Java Method which is dependent on ReflectiveInterceptor to catch calls to invoke .