public MMethod newMethod(MCpInfo clazz, String name, String signature) { MMethod method = new MMethod(this); MCpInfo methodName = newCpInfoUtf8(name); MCpInfo methodSign = newCpInfoUtf8(signature); MCpInfo methodNat = newCpInfo(CpNameAndType); MCpInfo methodRef = newCpInfo(CpMethodref); method.ptr_name = methodName; method.ptr_signature = methodSign; method.ptr_ref = methodRef; methodNat.ptr_name = methodName; methodNat.ptr_signature = methodSign; methodRef.ptr_class = clazz; methodRef.ptr_name_and_type = methodNat; return method; }