Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void main(String[] s) throws Exception{
- ClassGen cg = new ClassGen(new ClassParser("Client.class").parse());
- ConstantPoolGen cPoolGen = cg.getConstantPool();
- Field f = new FieldGen(Constants.ACC_PUBLIC, Type.INT, "test", cPoolGen).getField();
- cg.addField(f);
- /*for(Method a : cg.getMethods()){
- if(a.getName().equals("a")){
- a.setAccessFlags(Constants.ACC_PUBLIC);
- }
- }*/
- cg.getJavaClass().dump("Loader2.class");
- }
- }
Add Comment
Please, Sign In to add comment