added -J option to preserve unmodified files in preexisting jarfile
[org.ibex.tool.git] / src / org / eclipse / jdt / internal / compiler / lookup / ProblemReferenceBinding.java
1 /*******************************************************************************
2  * Copyright (c) 2000, 2004 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 org.eclipse.jdt.internal.compiler.lookup;
12
13 public class ProblemReferenceBinding extends ReferenceBinding {
14         public ReferenceBinding original;
15         private int problemReason;
16         public ReferenceBinding alternateMatch;
17         
18 // NOTE: must only answer the subset of the name related to the problem
19
20 public ProblemReferenceBinding(char[][] compoundName, int problemReason) {
21         this(compoundName, null, problemReason);
22 }
23 public ProblemReferenceBinding(char[] name, int problemReason) {
24         this(new char[][] {name}, null, problemReason);
25 }
26
27 public ProblemReferenceBinding(char[][] compoundName, ReferenceBinding original, int problemReason) {
28         this.compoundName = compoundName;
29         this.original = original;
30         this.problemReason = problemReason;
31 }
32 public ProblemReferenceBinding(char[] name, ReferenceBinding original, int problemReason) {
33         this(new char[][] {name}, original, problemReason);
34 }
35 /* API
36 * Answer the problem id associated with the receiver.
37 * NoError if the receiver is a valid binding.
38 */
39 public int problemId() {
40         return this.problemReason;
41 }
42
43 /**
44  * @see org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding#shortReadableName()
45  */
46 public char[] shortReadableName() {
47         return readableName();
48 }
49
50 }