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.expr.AnnotationExpr;
25: import japa.parser.ast.type.ClassOrInterfaceType;
26: import japa.parser.ast.visitor.GenericVisitor;
27: import japa.parser.ast.visitor.VoidVisitor;
28:
29: import java.util.List;
30:
31: /**
32: * @author Julio Vilmar Gesser
33: */
34: public final class EnumDeclaration extends TypeDeclaration {
35:
36: public final List<AnnotationExpr> annotations;
37:
38: public final List<ClassOrInterfaceType> implements List;
39:
40: public final List<EnumConstantDeclaration> entries;
41:
42: public EnumDeclaration(int line, int column, int modifiers,
43: List<AnnotationExpr> annotations, String name,
44: List<ClassOrInterfaceType> implements List,
45: List<EnumConstantDeclaration> entries,
46: List<BodyDeclaration> members) {
47: super (line, column, name, modifiers, members);
48: this .annotations = annotations;
49: this .implements List = implements List;
50: this .entries = entries;
51: }
52:
53: @Override
54: public <A> void accept(VoidVisitor<A> v, A arg) {
55: v.visit(this , arg);
56: }
57:
58: @Override
59: public <R, A> R accept(GenericVisitor<R, A> v, A arg) {
60: return v.visit(this, arg);
61: }
62: }
|