示例#1
0
 @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());
 }
示例#2
0
 @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);
 }