Search Java Code Snippets


  Help us in improving the repository. Add new snippets through 'Submit Code Snippet ' link.





Java - Code Samples

 Sample 1. Code Sample / Example / Snippet of org.apache.bcel.generic.CPInstruction

    public void replaceConstantPool(final ConstantPoolGen old_cp, final ConstantPoolGen new_cp) {

for (InstructionHandle ih = start; ih != null; ih = ih.getNext()) {

final Instruction i = ih.getInstruction();

if (i instanceof CPInstruction) {

final CPInstruction ci = (CPInstruction) i;

final Constant c = old_cp.getConstant(ci.getIndex());

ci.setIndex(new_cp.addConstant(c, old_cp));

}

}

}


   Like      Feedback      org.apache.bcel.generic.CPInstruction



Subscribe to Java News and Posts. Get latest updates and posts on Java from Buggybread.com
Enter your email address:
Delivered by FeedBurner