Fixed Bug<a href="http://sourceforge.net/tracker/?func=detail&atid=484801&aid=1145683...
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / compiler / lookup / ProblemReferenceBinding.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 class ProblemReferenceBinding extends ReferenceBinding {
14         public ReferenceBinding original;
15         private int problemId;
16 // NOTE: must only answer the subset of the name related to the problem
17
18 public ProblemReferenceBinding(char[][] compoundName, int problemId) {
19         this(compoundName, null, problemId);
20 }
21 public ProblemReferenceBinding(char[] name, int problemId) {
22         this(new char[][] {name}, null, problemId);
23 }
24
25 public ProblemReferenceBinding(char[][] compoundName, ReferenceBinding original, int problemId) {
26         this.compoundName = compoundName;
27         this.original = original;
28         this.problemId = problemId;
29 }
30 public ProblemReferenceBinding(char[] name, ReferenceBinding original, int problemId) {
31         this(new char[][] {name}, original, problemId);
32 }
33 /* API
34 * Answer the problem id associated with the receiver.
35 * NoError if the receiver is a valid binding.
36 */
37
38 public final int problemId() {
39         return problemId;
40 }
41
42 /**
43  * @see net.sourceforge.phpdt.internal.compiler.lookup.ReferenceBinding#shortReadableName()
44  */
45 public char[] shortReadableName() {
46         return readableName();
47 }
48
49 }