public void moveAllCommentsBefore() { if (getCommentAfter() != null) { addToCommentBefore(getCommentAfter()); setCommentAfter(null); } } public void deDioxygenizeCommentBefore() {
public Printer formatComments(Element e, boolean mergeCommentsAfter, boolean allowLineComments, boolean skipLineAfter, String... otherComments) { String cb = e.getCommentBefore(), ca = e.getCommentAfter(); if (cb != null || ca != null || otherComments.length > 0) { append(formatComments(indent, cb, ca, mergeCommentsAfter, allowLineComments, skipLineAfter, otherComments)); } return this; }
public Element importDetails(Element from, boolean move) { if (from == null) return this; 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; } protected <T> List<T> unmodifiableList(List<T> list) {
protected void outputNSString(String name, String value, DeclarationsHolder out, Signatures signatures, Element... elementsToTakeCommentsFrom) { if (!signatures.addVariable(name)) { return; } TypeRef tr = typeRef(String.class); VariablesDeclaration vd = new VariablesDeclaration(tr, new DirectDeclarator(name, expr(value))); if (!result.config.noComments) { for (Element e : elementsToTakeCommentsFrom) { vd.addToCommentBefore(e.getCommentBefore()); vd.addToCommentBefore(e.getCommentAfter()); } } vd.addModifiers(ModifierType.Public); out.addDeclaration(vd); } static Map<Class<?>, Pair<List<Pair<Function, String>>, Set<String>>> cachedForcedMethodsAndTheirSignatures;
protected void outputNSString(String name, String value, DeclarationsHolder out, Signatures signatures, Element... elementsToTakeCommentsFrom) { if (!signatures.addVariable(name)) { return; } TypeRef tr = typeRef(String.class); VariablesDeclaration vd = new VariablesDeclaration(tr, new DirectDeclarator(name, expr(value))); if (!result.config.noComments) { for (Element e : elementsToTakeCommentsFrom) { vd.addToCommentBefore(e.getCommentBefore()); vd.addToCommentBefore(e.getCommentAfter()); } } vd.addModifiers(ModifierType.Public); out.addDeclaration(vd); } static Map<Class<?>, Pair<List<Pair<Function, String>>, Set<String>>> cachedForcedMethodsAndTheirSignatures;
callbackStruct.addToCommentBefore(comel.getCommentBefore(), comel.getCommentAfter(), getFileCommentContent(comel));
callbackStruct.addToCommentBefore(comel.getCommentBefore(), comel.getCommentAfter(), getFileCommentContent(comel));