void replaceSlotWithFlattened(CAttribute cattr, Archetyped definition, CObject cobj) { List<CObject> children = cattr.getChildren(); if (children == null) { return; } for (int index = 0, j = children.size(); index < j; index++) { CObject child = children.get(index); if (child instanceof ArchetypeSlot) { // if the slot matches the template def children.remove(index); cobj.setPath(child.path()); children.add(index, cobj); } } }
/** * Finds and replaces according archetypeSlot with fully flattened cobj * * @param cattr * @param definition * @param cobj */ void replaceSlotWithFlattened(CAttribute cattr, Archetyped definition, CObject cobj) { List<CObject> children = cattr.getChildren(); if(children == null) { return; } for(int i = 0, j = children.size(); i < j; i++) { CObject child = children.get(i); if(child instanceof ArchetypeSlot) { // if the slot matches the template def children.remove(i); cobj.setPath(child.path()); children.add(i, cobj); } } }
/** * Finds and replaces according archetypeSlot with fully flattened cobj * * @param cattr * @param definition * @param cobj */ void replaceSlotWithFlattened(CAttribute cattr, Archetyped definition, CObject cobj) { List<CObject> children = cattr.getChildren(); if(children == null) { return; } for(int i = 0, j = children.size(); i < j; i++) { CObject child = children.get(i); if(child instanceof ArchetypeSlot) { // if the slot matches the template def children.remove(i); cobj.setPath(child.path()); children.add(i, cobj); } } }
path = prefix + path; cobj.setPath(path);
path = prefix + path; cobj.setPath(path);
path = prefix + path; cobj.setPath(path);
cobj.setPath(path);
cobj.setPath(path);