Makefile fixup
[org.ibex.tool.git] / src / org / eclipse / jdt / internal / compiler / ast / ImplicitDocTypeReference.java
1 /*******************************************************************************
2  * Copyright (c) 2000, 2004 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials 
4  * are made available under the terms of the Common Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/cpl-v10.html
7  * 
8  * Contributors:
9  *     IBM Corporation - initial API and implementation
10  *******************************************************************************/
11 package org.eclipse.jdt.internal.compiler.ast;
12
13 import org.eclipse.jdt.internal.compiler.ASTVisitor;
14 import org.eclipse.jdt.internal.compiler.lookup.ClassScope;
15 import org.eclipse.jdt.internal.compiler.lookup.Scope;
16 import org.eclipse.jdt.internal.compiler.lookup.TypeBinding;
17
18 public class ImplicitDocTypeReference extends TypeReference {
19         
20         public char[] token;
21
22         public ImplicitDocTypeReference(char[] name, int pos) {
23                 super();
24                 this.token = name;
25                 this.sourceStart = pos;
26                 this.sourceEnd = pos;
27         }
28         /* (non-Javadoc)
29          * @see org.eclipse.jdt.internal.compiler.ast.TypeReference#copyDims(int)
30          */
31         public TypeReference copyDims(int dim) {
32                 return null;
33         }
34         /* (non-Javadoc)
35          * @see org.eclipse.jdt.internal.compiler.ast.TypeReference#getTypeBinding(org.eclipse.jdt.internal.compiler.lookup.Scope)
36          */
37         public TypeBinding getTypeBinding(Scope scope) {
38                 this.constant = NotAConstant;
39                 return this.resolvedType = scope.enclosingSourceType();
40         }
41         /* (non-Javadoc)
42          * @see org.eclipse.jdt.internal.compiler.ast.TypeReference#getTypeName()
43          */
44         public char[][] getTypeName() {
45                 if (this.token != null) {
46                         char[][] tokens = { this.token };
47                         return tokens;
48                 }
49                 return null;
50         }
51         public boolean isThis() {
52                 return true;
53         }
54         /* (non-Javadoc)
55          * @see org.eclipse.jdt.internal.compiler.ast.TypeReference#traverse(org.eclipse.jdt.internal.compiler.ASTVisitor, org.eclipse.jdt.internal.compiler.lookup.ClassScope)
56          */
57         public void traverse(ASTVisitor visitor, ClassScope classScope) {
58                 // Do nothing
59         }
60         /* (non-Javadoc)
61          * @see org.eclipse.jdt.internal.compiler.ast.Expression#printExpression(int, java.lang.StringBuffer)
62          */
63         public StringBuffer printExpression(int indent, StringBuffer output) {
64                 return new StringBuffer();
65         }
66 }