MethodInfo(ClassFile parent, Modifiers modifiers, String name, MethodDesc desc) { mParent = parent; mCp = parent.getConstantPool(); mName = name; mDesc = desc; mModifiers = modifiers; mNameConstant = mCp.addConstantUTF(name); mDescriptorConstant = mCp.addConstantUTF(desc.getDescriptor()); if (!modifiers.isAbstract() && !modifiers.isNative()) { addAttribute(new CodeAttr(mCp)); } }
/** * Create a representation of the signature which includes the method name. * This uniquely identifies the method. * * @param m method to describe */ private static String createSig(Method m) { return m.getName() + ':' + MethodDesc.forMethod(m).getDescriptor(); }
/** * Create a representation of the signature which includes the method name. * This uniquely identifies the method. * * @param m method to describe */ private static String createSig(Method m) { return m.getName() + ':' + MethodDesc.forMethod(m).getDescriptor(); }
MethodInfo(ClassFile parent, Modifiers modifiers, String name, MethodDesc desc) { mParent = parent; mCp = parent.getConstantPool(); mName = name; mDesc = desc; mModifiers = modifiers; mNameConstant = mCp.addConstantUTF(name); mDescriptorConstant = mCp.addConstantUTF(desc.getDescriptor()); if (!modifiers.isAbstract() && !modifiers.isNative()) { addAttribute(new CodeAttr(mCp)); } }