td.bodyDeclarations().add(md);
@Override public void createBodyContent(final BiFunction<AST, CompilationUnit, List<ASTNode>> consumer) { final List<ASTNode> result = consumer.apply(this.ast, this.cu); if (result != null) { this.td.bodyDeclarations().addAll(result); } }
@Override public void createType(final TypeInformation type, final Consumer<TypeDeclaration> typeCustomizer, final Consumer<TypeBuilder> consumer) { final TypeDeclaration td = PackageTypeBuilder.createType(this.ast, this.cu, typeCustomizer, type); this.td.bodyDeclarations().add(td); consumer.accept(new ClassTypeBuilder(this.ast, this.cu, td, this.typeLookup, this.typeResolver)); }
public boolean visit(TypeDeclaration typeDeclaration) { List bodyDeclarations = typeDeclaration.bodyDeclarations(); boolean contains_malformed_nodes = false; for (Iterator iter = bodyDeclarations.iterator(); iter.hasNext();) { BodyDeclaration bodyDeclaration = (BodyDeclaration) iter.next(); bodyDeclaration.setProperty(CompilationUnitSorter.RELATIVE_ORDER, Integer.valueOf(bodyDeclaration.getStartPosition())); contains_malformed_nodes |= Boolean.valueOf(isMalformed(bodyDeclaration)); } typeDeclaration.setProperty(CONTAINS_MALFORMED_NODES, contains_malformed_nodes); return true; }
@Override public boolean visit(TypeDeclaration typeDeclaration) { List bodyDeclarations = typeDeclaration.bodyDeclarations(); boolean contains_malformed_nodes = false; for (Iterator iter = bodyDeclarations.iterator(); iter.hasNext();) { BodyDeclaration bodyDeclaration = (BodyDeclaration) iter.next(); bodyDeclaration.setProperty(CompilationUnitSorter.RELATIVE_ORDER, Integer.valueOf(bodyDeclaration.getStartPosition())); contains_malformed_nodes |= Boolean.valueOf(isMalformed(bodyDeclaration)); } typeDeclaration.setProperty(CONTAINS_MALFORMED_NODES, contains_malformed_nodes); return true; }
public boolean visit(TypeDeclaration typeDeclaration) { List bodyDeclarations = typeDeclaration.bodyDeclarations(); for (Iterator iter = bodyDeclarations.iterator(); iter.hasNext();) { BodyDeclaration bodyDeclaration = (BodyDeclaration) iter.next(); bodyDeclaration.setProperty(CompilationUnitSorter.RELATIVE_ORDER, new Integer(bodyDeclaration.getStartPosition())); typeDeclaration.setProperty(CONTAINS_MALFORMED_NODES, Boolean.valueOf(isMalformed(bodyDeclaration))); } return true; }
public boolean visit(TypeDeclaration typeDeclaration) { List bodyDeclarations = typeDeclaration.bodyDeclarations(); for (Iterator iter = bodyDeclarations.iterator(); iter.hasNext();) { BodyDeclaration bodyDeclaration = (BodyDeclaration) iter.next(); bodyDeclaration.setProperty(CompilationUnitSorter.RELATIVE_ORDER, new Integer(bodyDeclaration.getStartPosition())); typeDeclaration.setProperty(CONTAINS_MALFORMED_NODES, Boolean.valueOf(isMalformed(bodyDeclaration))); } return true; }
public boolean visit(TypeDeclaration typeDeclaration) { List bodyDeclarations = typeDeclaration.bodyDeclarations(); boolean contains_malformed_nodes = false; for (Iterator iter = bodyDeclarations.iterator(); iter.hasNext();) { BodyDeclaration bodyDeclaration = (BodyDeclaration) iter.next(); bodyDeclaration.setProperty(CompilationUnitSorter.RELATIVE_ORDER, Integer.valueOf(bodyDeclaration.getStartPosition())); contains_malformed_nodes |= Boolean.valueOf(isMalformed(bodyDeclaration)); } typeDeclaration.setProperty(CONTAINS_MALFORMED_NODES, contains_malformed_nodes); return true; }
@Override public boolean visit(TypeDeclaration typeDeclaration) { if (checkMalformedNodes(typeDeclaration)) { return true; // abort sorting of current element } sortElements(typeDeclaration.bodyDeclarations(), rewriter.getListRewrite(typeDeclaration, TypeDeclaration.BODY_DECLARATIONS_PROPERTY)); return true; }
public boolean visit(TypeDeclaration typeDeclaration) { if (checkMalformedNodes(typeDeclaration)) { return true; // abort sorting of current element } sortElements(typeDeclaration.bodyDeclarations(), rewriter.getListRewrite(typeDeclaration, TypeDeclaration.BODY_DECLARATIONS_PROPERTY)); return true; }
public boolean visit(TypeDeclaration typeDeclaration) { if (checkMalformedNodes(typeDeclaration)) { return true; // abort sorting of current element } sortElements(typeDeclaration.bodyDeclarations(), rewriter.getListRewrite(typeDeclaration, TypeDeclaration.BODY_DECLARATIONS_PROPERTY)); return true; }
public boolean visit(TypeDeclaration typeDeclaration) { if (checkMalformedNodes(typeDeclaration)) { return true; // abort sorting of current element } sortElements(typeDeclaration.bodyDeclarations(), rewriter.getListRewrite(typeDeclaration, TypeDeclaration.BODY_DECLARATIONS_PROPERTY)); return true; }
@Override public void endVisit(TypeDeclaration node) { if (node.getParent().getLength() == 0) return; // this is a fake block created by parsing in statements mode tryKeepOnOneLine(node, node.getName(), node.bodyDeclarations(), this.options.keep_type_declaration_on_one_line); }
public boolean visit(TypeDeclaration node) { handleBodyDeclarations(node.bodyDeclarations()); if (node.getName().getStartPosition() == -1) return true; // this is a fake type created by parsing in class body mode breakLineBefore(node); handleBracedCode(node, node.getName(), this.options.brace_position_for_type_declaration, this.options.indent_body_declarations_compare_to_type_header, this.options.insert_new_line_in_empty_type_declaration); this.declarationModifierVisited = false; return true; }
@Override public boolean visit(TypeDeclaration node) { handleBodyDeclarations(node.bodyDeclarations()); if (node.getName().getStartPosition() == -1) return true; // this is a fake type created by parsing in class body mode breakLineBefore(node); handleBracedCode(node, node.getName(), this.options.brace_position_for_type_declaration, this.options.indent_body_declarations_compare_to_type_header); this.declarationModifierVisited = false; return true; }
public boolean visit(TypeDeclaration node) { handleBodyDeclarations(node.bodyDeclarations()); if (node.getName().getStartPosition() == -1) return true; // this is a fake type created by parsing in class body mode breakLineBefore(node); handleBracedCode(node, node.getName(), this.options.brace_position_for_type_declaration, this.options.indent_body_declarations_compare_to_type_header, this.options.insert_new_line_in_empty_type_declaration); this.declarationModifierVisited = false; return true; }
@Override public void endVisit(TypeDeclaration node) { if (skipNode(node)) { return; } GenericSequentialFlowInfo info = processSequential(node, node.getSuperclassType()); process(info, node.superInterfaceTypes()); process(info, node.bodyDeclarations()); info.setNoReturn(); }
@Override public void endVisit(TypeDeclaration node) { if (skipNode(node)) return; GenericSequentialFlowInfo info= processSequential(node, node.getSuperclassType()); process(info, node.superInterfaceTypes()); process(info, node.bodyDeclarations()); info.setNoReturn(); }
public void endVisit(TypeDeclaration node) { if (skipNode(node)) return; GenericSequentialFlowInfo info= processSequential(node, node.getSuperclassType()); process(info, node.superInterfaceTypes()); process(info, node.bodyDeclarations()); info.setNoReturn(); }
@Override public void endVisit(TypeDeclaration node) { if (skipNode(node)) return; GenericSequentialFlowInfo info= processSequential(node, node.getSuperclassType()); process(info, node.superInterfaceTypes()); process(info, node.bodyDeclarations()); info.setNoReturn(); }