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.classfile.LocalVariableTable

    public void testB79() throws ClassNotFoundException

{

final JavaClass clazz = getTestClass(PACKAGE_BASE_NAME+".data.PLSETestClass");

final ClassGen gen = new ClassGen(clazz);

final ConstantPoolGen pool = gen.getConstantPool();

final Method m = gen.getMethodAt(2);

final LocalVariableTable lvt = m.getLocalVariableTable();

final MethodGen mg = new MethodGen(m, gen.getClassName(), pool);

final LocalVariableTable new_lvt = mg.getLocalVariableTable(mg.getConstantPool());

assertEquals("number of locals", lvt.getTableLength(), new_lvt.getTableLength());

}


   Like      Feedback      org.apache.bcel.classfile.LocalVariableTable



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