@Override public Node visit(ConstructorDeclaration _n, Object _arg) { JavadocComment javaDoc = cloneNodes(_n.getJavaDoc(), _arg); List<AnnotationExpr> annotations = visit(_n.getAnnotations(), _arg); List<TypeParameter> typeParameters = visit(_n.getTypeParameters(), _arg); List<Parameter> parameters = visit(_n.getParameters(), _arg); List<NameExpr> throws_ = visit(_n.getThrows(), _arg); BlockStmt block = cloneNodes(_n.getBlock(), _arg); Comment comment = cloneNodes(_n.getComment(), _arg); ConstructorDeclaration r = new ConstructorDeclaration( _n.getBeginLine(), _n.getBeginColumn(), _n.getEndLine(), _n.getEndColumn(), _n.getModifiers(), annotations, typeParameters, _n.getName(), parameters, throws_, block ); r.setComment(comment); return r; }
@Override public Boolean visit(final ConstructorDeclaration n1, final Node arg) { final ConstructorDeclaration n2 = (ConstructorDeclaration) arg; // javadoc are checked at CompilationUnit if (n1.getModifiers() != n2.getModifiers()) { return Boolean.FALSE; } if (!objEquals(n1.getName(), n2.getName())) { return Boolean.FALSE; } if (!nodesEquals(n1.getAnnotations(), n2.getAnnotations())) { return Boolean.FALSE; } if (!nodeEquals(n1.getBlock(), n2.getBlock())) { return Boolean.FALSE; } if (!nodesEquals(n1.getParameters(), n2.getParameters())) { return Boolean.FALSE; } if (!nodesEquals(n1.getThrows(), n2.getThrows())) { return Boolean.FALSE; } if (!nodesEquals(n1.getTypeParameters(), n2.getTypeParameters())) { return Boolean.FALSE; } return Boolean.TRUE; }
@Override public void visit(final ConstructorDeclaration n, final A arg) { visitComment(n.getComment(), arg); if (n.getJavaDoc() != null) { n.getJavaDoc().accept(this, arg); } if (n.getAnnotations() != null) { for (final AnnotationExpr a : n.getAnnotations()) { a.accept(this, arg); } } if (n.getTypeParameters() != null) { for (final TypeParameter t : n.getTypeParameters()) { t.accept(this, arg); } } if (n.getParameters() != null) { for (final Parameter p : n.getParameters()) { p.accept(this, arg); } } if (n.getThrows() != null) { for (final NameExpr name : n.getThrows()) { name.accept(this, arg); } } n.getBlock().accept(this, arg); }
@Override public Node visit(final ConstructorDeclaration n, final A arg) { if (n.getJavaDoc() != null) { n.setJavaDoc((JavadocComment) n.getJavaDoc().accept(this, arg)); final List<AnnotationExpr> annotations = n.getAnnotations(); if (annotations != null) { for (int i = 0; i < annotations.size(); i++) { final List<TypeParameter> typeParameters = n.getTypeParameters(); if (typeParameters != null) { for (int i = 0; i < typeParameters.size(); i++) { final List<Parameter> parameters = n.getParameters(); if (parameters != null) { for (int i = 0; i < parameters.size(); i++) { final List<NameExpr> throwz = n.getThrows(); if (throwz != null) { for (int i = 0; i < throwz.size(); i++) { n.setBlock((BlockStmt) n.getBlock().accept(this, arg)); return n;
@Override public Void visit(ConstructorDeclaration n, Visit v) { Iterator<Signature> signatures = ((Visit.TD)v).constructorSignatures; if (!signatures.hasNext()) { throw new CodeSourceException("Did not find a constructor signature for declaration " + n.getName()); } // Signature signature = signatures.next(); // SignedMemberSource methodSource = new SignedMemberSource( new MemberKey(n.getName(), signature), clip(n), v.javaDoc(n)); // ((Visit.TD)v).stack.getLast().addLast(methodSource); return super.visit(n, v); } }
stmts = add(0, stmts, exConsInv); ConstructorDeclaration tmp = new ConstructorDeclaration(line, column, token.endLine, token.endColumn, modifier.modifiers, modifier.annotations, typeParameters, null, parameters, throws_, new BlockStmt(bbLine, bbColumn, token.endLine, token.endColumn, stmts)); tmp.setNameExpr(name);
stmts = add(0, stmts, exConsInv); {if (true) return new ConstructorDeclaration(line, column, token.endLine, token.endColumn,popJavadoc(), modifier.modifiers, modifier.annotations, typeParameters, name, parameters, throws_, new BlockStmt(bbLine, bbColumn, token.endLine, token.endColumn, stmts));} throw new Error("Missing return statement in function");
@Override public void visit(final ConstructorDeclaration n, final Object arg) { printJavaComment(n.getComment(), arg); printJavadoc(n.getJavaDoc(), arg); printMemberAnnotations(n.getAnnotations(), arg); printModifiers(n.getModifiers()); printTypeParameters(n.getTypeParameters(), arg); if (n.getTypeParameters() != null) { printer.print(" "); printer.print(n.getName()); if (n.getParameters() != null) { for (final Iterator<Parameter> i = n.getParameters().iterator(); i.hasNext();) { final Parameter p = i.next(); p.accept(this, arg); if (n.getThrows() != null) { printer.print(" throws "); for (final Iterator<NameExpr> i = n.getThrows().iterator(); i.hasNext();) { final NameExpr name = i.next(); name.accept(this, arg); n.getBlock().accept(this, arg);
@Override public R visit(final ConstructorDeclaration n, final A arg) { if (n.getJavaDoc() != null) { R result = n.getJavaDoc().accept(this, arg); if (result != null) { return result; if (n.getAnnotations() != null) { for (final AnnotationExpr a : n.getAnnotations()) { if (n.getTypeParameters() != null) { for (final TypeParameter t : n.getTypeParameters()) { if (n.getParameters() != null) { for (final Parameter p : n.getParameters()) { if (n.getThrows() != null) { for (final NameExpr name : n.getThrows()) { R result = n.getBlock().accept(this, arg); if (result != null) { return result;
public void visit(ConstructorDeclaration n, Object arg) { printJavadoc(n.getJavaDoc(), arg); printMemberAnnotations(n.getAnnotations(), arg); printModifiers(n.getModifiers()); printTypeParameters(n.getTypeParameters(), arg); if (n.getTypeParameters() != null) { printer.print(" "); printer.print(n.getName()); if (n.getParameters() != null) { for (Iterator<Parameter> i = n.getParameters().iterator(); i.hasNext();) { Parameter p = i.next(); p.accept(this, arg); if (n.getThrows() != null) { printer.print(" throws "); for (Iterator<NameExpr> i = n.getThrows().iterator(); i.hasNext();) { NameExpr name = i.next(); name.accept(this, arg); n.getBlock().accept(this, arg);