@Override public int lookupConstant(ConstantPoolGen cpg) { MethodRef method = getValue(); if (isInterfaceMethod()) { return cpg.lookupInterfaceMethodref( method.getClassName(), method.getName(), method.getDescriptor().toString()); } return cpg.lookupMethodref( method.getClassName(), method.getName(), method.getDescriptor().toString()); }
@Override public Constant createConstant(ConstantPoolGen cpg) { MethodRef method = getValue(); int i = cpg.addClass(method.getClassName()); int n = cpg.addNameAndType(method.getName(), method.getDescriptor().toString()); return new ConstantMethodref(i, n); }