1 /*******************************************************************************
2 * Copyright (c) 2000, 2001, 2002 International Business Machines Corp. and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Common Public License v0.5
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/cpl-v05.html
9 * IBM Corporation - initial API and implementation
10 ******************************************************************************/
11 package net.sourceforge.phpdt.internal.compiler.ast;
13 import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor;
14 import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope;
15 import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding;
17 public class QualifiedSuperReference extends QualifiedThisReference {
19 public QualifiedSuperReference(TypeReference name, int pos, int sourceEnd) {
20 super(name, pos, sourceEnd);
23 public boolean isSuper() {
28 public boolean isThis() {
33 public TypeBinding resolveType(BlockScope scope) {
35 super.resolveType(scope);
36 if (currentCompatibleType == null)
37 return null; // error case
39 if (scope.isJavaLangObject(currentCompatibleType)) {
40 scope.problemReporter().cannotUseSuperInJavaLangObject(this);
43 return currentCompatibleType.superclass();
46 public String toStringExpression() {
48 return qualification.toString(0) + ".super"; //$NON-NLS-1$
52 IAbstractSyntaxTreeVisitor visitor,
53 BlockScope blockScope) {
55 if (visitor.visit(this, blockScope)) {
56 qualification.traverse(visitor, blockScope);
58 visitor.endVisit(this, blockScope);