01: /* Generated By:JJTree: Do not edit this line. ASTCompilationUnit.java */
02:
03: package net.sourceforge.pmd.ast;
04:
05: import net.sourceforge.pmd.typeresolution.ClassTypeResolver;
06:
07: // FUTURE Change this class to extend from SimpleJavaNode, as TypeNode is not appropriate (unless I'm wrong)
08: public class ASTCompilationUnit extends SimpleJavaTypeNode implements
09: CompilationUnit {
10:
11: private ClassTypeResolver classTypeResolver;
12:
13: public ASTCompilationUnit(int id) {
14: super (id);
15: }
16:
17: public ASTCompilationUnit(JavaParser p, int id) {
18: super (p, id);
19: }
20:
21: /**
22: * Accept the visitor. *
23: */
24: public Object jjtAccept(JavaParserVisitor visitor, Object data) {
25: return visitor.visit(this , data);
26: }
27:
28: public boolean declarationsAreInDefaultPackage() {
29: return getPackageDeclaration() == null;
30: }
31:
32: public ASTPackageDeclaration getPackageDeclaration() {
33: return getFirstChildOfType(ASTPackageDeclaration.class);
34: }
35:
36: public ClassTypeResolver getClassTypeResolver() {
37: return classTypeResolver;
38: }
39:
40: public void setClassTypeResolver(ClassTypeResolver classTypeResolver) {
41: this.classTypeResolver = classTypeResolver;
42: }
43: }
|