コード例 #1
0
 public void removeField(String oldName) {
   ClassNode r = redirect();
   if (r.fieldIndex == null) r.fieldIndex = new HashMap<String, FieldNode>();
   final Map<String, FieldNode> index = r.fieldIndex;
   r.fields.remove(index.get(oldName));
   index.remove(oldName);
 }
コード例 #2
0
 public void renameField(String oldName, String newName) {
   ClassNode r = redirect();
   if (r.fieldIndex == null) r.fieldIndex = new HashMap<String, FieldNode>();
   final Map<String, FieldNode> index = r.fieldIndex;
   index.put(newName, index.remove(oldName));
 }