public Element importDetails(Element from, boolean move) { if (from == null) return this; if (!from.getNameSpace().isEmpty()) setNameSpace(from.getNameSpace()); if (from.getElementFile() != null) setElementFile(from.getElementFile()); if (from.getElementLine() >= 0) setElementLine(from.getElementLine()); if (from.getCommentBefore() != null) addToCommentBefore(from.getCommentBefore()); if (from.getCommentAfter() != null) setCommentAfter(from.getCommentAfter()); if (move) from.stripDetails(); return this; }
public void moveAllCommentsBefore() { if (getCommentAfter() != null) { addToCommentBefore(getCommentAfter()); setCommentAfter(null); } }
public void stripDetails() { setCommentBefore(null); setCommentAfter(null); setElementFile(null); setElementLine(-1); }