public void getDeclaredMethod(ClassMethod classMethod, String declaringClass, String methodName, String[] parameterTypes, ClassMethod staticConstructor) {
// get the correct class type to use to resolve the method
MethodInformation methodInfo = new StaticMethodInformation("getTargetClass", new String[0], LJAVA_LANG_CLASS, TargetInstanceProxy.class.getName());
invokeMethodHandler(classMethod, methodInfo, false, DEFAULT_METHOD_RESOLVER, staticConstructor);
CodeAttribute code = classMethod.getCodeAttribute();
code.checkcast("java/lang/Class");
// now we have the class on the stack
code.ldc(methodName);
// now we need to load the parameter types into an array
code.iconst(parameterTypes.length);
code.anewarray(JAVA_LANG_CLASS_CLASS_NAME);