*** empty log message ***
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / compiler / lookup / ProblemBinding.java
1 /*******************************************************************************
2  * Copyright (c) 2000, 2001, 2002 International Business Machines Corp. and others.
3  * All rights reserved. This program and the accompanying materials 
4  * are made available under the terms of the Common Public License v0.5 
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/cpl-v05.html
7  * 
8  * Contributors:
9  *     IBM Corporation - initial API and implementation
10  ******************************************************************************/
11 package net.sourceforge.phpdt.internal.compiler.lookup;
12
13 import net.sourceforge.phpdt.internal.compiler.util.CharOperation;
14
15 public class ProblemBinding extends Binding {
16         public char[] name;
17         public ReferenceBinding searchType;
18         private int problemId;
19 // NOTE: must only answer the subset of the name related to the problem
20
21 public ProblemBinding(char[][] compoundName, int problemId) {
22         this(CharOperation.concatWith(compoundName, '.'), problemId);
23 }
24 // NOTE: must only answer the subset of the name related to the problem
25
26 public ProblemBinding(char[][] compoundName, ReferenceBinding searchType, int problemId) {
27         this(CharOperation.concatWith(compoundName, '.'), searchType, problemId);
28 }
29 ProblemBinding(char[] name, int problemId) {
30         this.name = name;
31         this.problemId = problemId;
32 }
33 ProblemBinding(char[] name, ReferenceBinding searchType, int problemId) {
34         this(name, problemId);
35         this.searchType = searchType;
36 }
37 /* API
38 * Answer the receiver's binding type from Binding.BindingID.
39 */
40
41 public final int bindingType() {
42         return VARIABLE | TYPE;
43 }
44 /* API
45 * Answer the problem id associated with the receiver.
46 * NoError if the receiver is a valid binding.
47 */
48
49 public final int problemId() {
50         return problemId;
51 }
52 public char[] readableName() {
53         return name;
54 }
55 }