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
9 * IBM Corporation - initial API and implementation
10 *******************************************************************************/
11 package net.sourceforge.phpdt.internal.compiler.lookup;
13 import net.sourceforge.phpdt.core.compiler.CharOperation;
15 public class ProblemBinding extends Binding {
18 public ReferenceBinding searchType;
20 private int problemId;
22 // NOTE: must only answer the subset of the name related to the problem
24 public ProblemBinding(char[][] compoundName, int problemId) {
25 this(CharOperation.concatWith(compoundName, '.'), problemId);
28 // NOTE: must only answer the subset of the name related to the problem
30 public ProblemBinding(char[][] compoundName, ReferenceBinding searchType,
32 this(CharOperation.concatWith(compoundName, '.'), searchType, problemId);
35 ProblemBinding(char[] name, int problemId) {
37 this.problemId = problemId;
40 ProblemBinding(char[] name, ReferenceBinding searchType, int problemId) {
41 this(name, problemId);
42 this.searchType = searchType;
46 * API Answer the receiver's binding type from Binding.BindingID.
49 public final int bindingType() {
50 return VARIABLE | TYPE;
54 * API Answer the problem id associated with the receiver. NoError if the
55 * receiver is a valid binding.
58 public final int problemId() {
62 public char[] readableName() {