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