A massive organize imports and formatting of the sources using default Eclipse code...
[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
16         private int problemId;
17
18         // NOTE: must only answer the subset of the name related to the problem
19
20         public ProblemReferenceBinding(char[][] compoundName, int problemId) {
21                 this(compoundName, null, problemId);
22         }
23
24         public ProblemReferenceBinding(char[] name, int problemId) {
25                 this(new char[][] { name }, null, problemId);
26         }
27
28         public ProblemReferenceBinding(char[][] compoundName,
29                         ReferenceBinding original, int problemId) {
30                 this.compoundName = compoundName;
31                 this.original = original;
32                 this.problemId = problemId;
33         }
34
35         public ProblemReferenceBinding(char[] name, ReferenceBinding original,
36                         int problemId) {
37                 this(new char[][] { name }, original, problemId);
38         }
39
40         /*
41          * API Answer the problem id associated with the receiver. NoError if the
42          * receiver is a valid binding.
43          */
44
45         public final int problemId() {
46                 return problemId;
47         }
48
49         /**
50          * @see net.sourceforge.phpdt.internal.compiler.lookup.ReferenceBinding#shortReadableName()
51          */
52         public char[] shortReadableName() {
53                 return readableName();
54         }
55
56 }