01: /*
02: * Copyright (C) 2007 Júlio Vilmar Gesser.
03: *
04: * This file is part of Java 1.5 parser and Abstract Syntax Tree.
05: *
06: * Java 1.5 parser and Abstract Syntax Tree is free software: you can redistribute it and/or modify
07: * it under the terms of the GNU Lesser General Public License as published by
08: * the Free Software Foundation, either version 3 of the License, or
09: * (at your option) any later version.
10: *
11: * Java 1.5 parser and Abstract Syntax Tree is distributed in the hope that it will be useful,
12: * but WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14: * GNU Lesser General Public License for more details.
15: *
16: * You should have received a copy of the GNU Lesser General Public License
17: * along with Java 1.5 parser and Abstract Syntax Tree. If not, see <http://www.gnu.org/licenses/>.
18: */
19: /*
20: * Created on 05/10/2006
21: */
22: package japa.parser.ast.body;
23:
24: import japa.parser.ast.TypeParameter;
25: import japa.parser.ast.expr.AnnotationExpr;
26: import japa.parser.ast.expr.NameExpr;
27: import japa.parser.ast.stmt.BlockStmt;
28: import japa.parser.ast.visitor.GenericVisitor;
29: import japa.parser.ast.visitor.VoidVisitor;
30:
31: import java.util.List;
32:
33: /**
34: * @author Julio Vilmar Gesser
35: */
36: public final class ConstructorDeclaration extends BodyDeclaration {
37:
38: public final int modifiers;
39:
40: public final List<AnnotationExpr> annotations;
41:
42: public final List<TypeParameter> typeParameters;
43:
44: public final String name;
45:
46: public final List<Parameter> parameters;
47:
48: public final List<NameExpr> throws_;
49:
50: public final BlockStmt block;
51:
52: public ConstructorDeclaration(int line, int column, int modifiers,
53: List<AnnotationExpr> annotations,
54: List<TypeParameter> typeParameters, String name,
55: List<Parameter> parameters, List<NameExpr> throws_,
56: BlockStmt block) {
57: super (line, column);
58:
59: this .modifiers = modifiers;
60: this .annotations = annotations;
61: this .typeParameters = typeParameters;
62: this .name = name;
63: this .parameters = parameters;
64: this .throws_ = throws_;
65: this .block = block;
66: }
67:
68: @Override
69: public <A> void accept(VoidVisitor<A> v, A arg) {
70: v.visit(this , arg);
71: }
72:
73: @Override
74: public <R, A> R accept(GenericVisitor<R, A> v, A arg) {
75: return v.visit(this, arg);
76: }
77: }
|