X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Feclipse%2Fjdt%2Finternal%2Fcompiler%2Fast%2FImplicitDocTypeReference.java;fp=src%2Forg%2Feclipse%2Fjdt%2Finternal%2Fcompiler%2Fast%2FImplicitDocTypeReference.java;h=9dda67ee74093e88857e829416ae572a82f07ac4;hb=040fa5af2cd00017cf3575950cdaade34a6d7f6c;hp=0000000000000000000000000000000000000000;hpb=a580fb8376d315d05e4d6bfdff9ff1101a151cd6;p=org.ibex.tool.git diff --git a/src/org/eclipse/jdt/internal/compiler/ast/ImplicitDocTypeReference.java b/src/org/eclipse/jdt/internal/compiler/ast/ImplicitDocTypeReference.java new file mode 100644 index 0000000..9dda67e --- /dev/null +++ b/src/org/eclipse/jdt/internal/compiler/ast/ImplicitDocTypeReference.java @@ -0,0 +1,66 @@ +/******************************************************************************* + * Copyright (c) 2000, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Common Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/cpl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jdt.internal.compiler.ast; + +import org.eclipse.jdt.internal.compiler.ASTVisitor; +import org.eclipse.jdt.internal.compiler.lookup.ClassScope; +import org.eclipse.jdt.internal.compiler.lookup.Scope; +import org.eclipse.jdt.internal.compiler.lookup.TypeBinding; + +public class ImplicitDocTypeReference extends TypeReference { + + public char[] token; + + public ImplicitDocTypeReference(char[] name, int pos) { + super(); + this.token = name; + this.sourceStart = pos; + this.sourceEnd = pos; + } + /* (non-Javadoc) + * @see org.eclipse.jdt.internal.compiler.ast.TypeReference#copyDims(int) + */ + public TypeReference copyDims(int dim) { + return null; + } + /* (non-Javadoc) + * @see org.eclipse.jdt.internal.compiler.ast.TypeReference#getTypeBinding(org.eclipse.jdt.internal.compiler.lookup.Scope) + */ + public TypeBinding getTypeBinding(Scope scope) { + this.constant = NotAConstant; + return this.resolvedType = scope.enclosingSourceType(); + } + /* (non-Javadoc) + * @see org.eclipse.jdt.internal.compiler.ast.TypeReference#getTypeName() + */ + public char[][] getTypeName() { + if (this.token != null) { + char[][] tokens = { this.token }; + return tokens; + } + return null; + } + public boolean isThis() { + return true; + } + /* (non-Javadoc) + * @see org.eclipse.jdt.internal.compiler.ast.TypeReference#traverse(org.eclipse.jdt.internal.compiler.ASTVisitor, org.eclipse.jdt.internal.compiler.lookup.ClassScope) + */ + public void traverse(ASTVisitor visitor, ClassScope classScope) { + // Do nothing + } + /* (non-Javadoc) + * @see org.eclipse.jdt.internal.compiler.ast.Expression#printExpression(int, java.lang.StringBuffer) + */ + public StringBuffer printExpression(int indent, StringBuffer output) { + return new StringBuffer(); + } +}