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,
16 * API Answer the receiver's binding type from Binding.BindingID.
18 * Note: Do NOT expect this to be used very often... only in switch
19 * statements with more than 2 possible choices.
21 public abstract int bindingType();
24 * API Answer true if the receiver is not a problem binding
27 public final boolean isValidBinding() {
28 return problemId() == NoError;
32 * API Answer the problem id associated with the receiver. NoError if the
33 * receiver is a valid binding.
36 public int problemId() {
41 * Answer a printable representation of the receiver.
43 public abstract char[] readableName();
46 * Shorter printable representation of the receiver (no qualified type)
48 public char[] shortReadableName() {
49 return readableName();