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