@Override public boolean replaceChild(Element child, Element by) { if (super.replaceChild(child, by)) return true; if (replaceChild(items, EnumItem.class, this, child, by)) return true; if (replaceChild(interfaces, Identifier.class, this, child, by)) return true; if (child == getBody()) { setBody((Struct) by); return true; } return super.replaceChild(child, by); } }
@Override public boolean replaceChild(Element child, Element by) { if (super.replaceChild(child, by)) return true; if (replaceChild(protocols, SimpleTypeRef.class, this, child, by)) return true; if (replaceChild(parents, SimpleTypeRef.class, this, child, by)) return true; return replaceChild(declarations, Declaration.class, this, child, by); }