Makefile fixup
[org.ibex.tool.git] / repo / org.ibex.tool / src / org / eclipse / jdt / internal / compiler / lookup / Binding.java
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
7  * 
8  * Contributors:
9  *     IBM Corporation - initial API and implementation
10  *******************************************************************************/
11 package org.eclipse.jdt.internal.compiler.lookup;
12
13 public abstract class Binding implements BindingIds, CompilerModifiers, ProblemReasons {
14         /* API
15         * Answer the receiver's binding type from Binding.BindingID.
16         *
17         * Note: Do NOT expect this to be used very often... only in switch statements with
18         * more than 2 possible choices.
19         */
20         public abstract int bindingType();
21         /* API
22         * Answer true if the receiver is not a problem binding
23         */
24         
25         public final boolean isValidBinding() {
26                 return problemId() == NoError;
27         }
28         /* API
29         * Answer the problem id associated with the receiver.
30         * NoError if the receiver is a valid binding.
31         */
32         
33         public int problemId() {
34                 return NoError;
35         }
36         /* Answer a printable representation of the receiver.
37         */
38         public abstract char[] readableName();
39
40         /* Shorter printable representation of the receiver (no qualified type)
41          */     
42         public char[] shortReadableName(){
43                 return readableName();
44         }
45 }