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
9 * IBM Corporation - initial API and implementation
10 *******************************************************************************/
11 package org.eclipse.jdt.internal.compiler.ast;
13 import org.eclipse.jdt.internal.compiler.ASTVisitor;
14 import org.eclipse.jdt.internal.compiler.lookup.*;
16 public class QualifiedSuperReference extends QualifiedThisReference {
18 public QualifiedSuperReference(TypeReference name, int pos, int sourceEnd) {
19 super(name, pos, sourceEnd);
22 public boolean isSuper() {
27 public boolean isThis() {
32 public StringBuffer printExpression(int indent, StringBuffer output) {
34 return qualification.print(0, output).append(".super"); //$NON-NLS-1$
37 public TypeBinding resolveType(BlockScope scope) {
39 if ((this.bits & ParenthesizedMASK) != 0) {
40 scope.problemReporter().invalidParenthesizedExpression(this);
43 super.resolveType(scope);
44 if (currentCompatibleType == null)
45 return null; // error case
47 if (currentCompatibleType.id == T_Object) {
48 scope.problemReporter().cannotUseSuperInJavaLangObject(this);
51 return this.resolvedType = currentCompatibleType.superclass();
56 BlockScope blockScope) {
58 if (visitor.visit(this, blockScope)) {
59 qualification.traverse(visitor, blockScope);
61 visitor.endVisit(this, blockScope);