.getDescriptor(), method.getAccessFlags(), null, null,
method.getExceptions());
}
if (!this.methodEditor.wasCancelled()) {
AccessFlags af = this.methodEditor.getAccessFlags();
String name = this.methodEditor.getMethodName();
Descriptor desc = this.methodEditor.getDescriptor();
int maxStack = this.methodEditor.getMaxStack();
int maxLocals = this.methodEditor.getMaxLocals();
EditorFacade.getInstance().modifyMethod(
mdr.getClassFile().getPool(), mdr.getMethod(), name,
desc, af, maxStack, maxLocals,
methodEditor.getExceptions());
}
} else if (o instanceof FieldDefRow) {
FieldDefRow fdr = (FieldDefRow) o;
Field field = fdr.getField();
int flags = field.getAccessFlags();
this.fieldEditor.invoke(field.getName(), field.getDescriptor(),
flags);
if (!this.fieldEditor.wasCancelled()) {
AccessFlags af = this.fieldEditor.getAccessFlags();
String name = this.fieldEditor.getFieldName();
Descriptor desc = this.fieldEditor.getType();
EditorFacade.getInstance().modifyField(
fdr.getClassFile().getPool(), fdr.getField(), name,
desc, af);
}
} else if (o instanceof ClassDefRow) {
ClassDefRow cdr = (ClassDefRow) o;
ClassFile cf = cdr.getClassFile();
this.classEditor.invoke(cf.getFullClassName(), cf
.getSuperClassName(), cf.getAccessFlags(), cf
.getInterfaces());
if (!this.classEditor.wasCancelled()) {
String name = this.classEditor.getClassName();
String superName = this.classEditor.getSuperClassname();
AccessFlags flags = this.classEditor.getFlags();
List<String> intfs = this.classEditor.getInterfaces();
/* new list as user has modified it */
List<Interface> remainingInterfaces = new ArrayList<Interface>();
/* interfaces that remain untouched */
List<Interface> old = cf.getInterfaces();