1 /*******************************************************************************
2 * Copyright (c) 2000, 2003 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 net.sourceforge.phpdt.internal.compiler.lookup;
13 public abstract class Binding implements BindingIds, CompilerModifiers, ProblemReasons {
15 * Answer the receiver's binding type from Binding.BindingID.
17 * Note: Do NOT expect this to be used very often... only in switch statements with
18 * more than 2 possible choices.
20 public abstract int bindingType();
22 * Answer true if the receiver is not a problem binding
25 public final boolean isValidBinding() {
26 return problemId() == NoError;
29 * Answer the problem id associated with the receiver.
30 * NoError if the receiver is a valid binding.
33 public int problemId() {
36 /* Answer a printable representation of the receiver.
38 public abstract char[] readableName();
40 /* Shorter printable representation of the receiver (no qualified type)
42 public char[] shortReadableName(){
43 return readableName();