Refactory: Remove UI from core plugin.
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / compiler / lookup / ProblemMethodBinding.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 ProblemMethodBinding extends MethodBinding {
14         private int problemId;
15
16         public MethodBinding closestMatch;
17
18         public ProblemMethodBinding(char[] selector, TypeBinding[] args,
19                         int problemId) {
20                 this.selector = selector;
21                 this.parameters = (args == null || args.length == 0) ? NoParameters
22                                 : args;
23                 this.problemId = problemId;
24         }
25
26         public ProblemMethodBinding(char[] selector, TypeBinding[] args,
27                         ReferenceBinding declaringClass, int problemId) {
28                 this.selector = selector;
29                 this.parameters = (args == null || args.length == 0) ? NoParameters
30                                 : args;
31                 this.declaringClass = declaringClass;
32                 this.problemId = problemId;
33         }
34
35         public ProblemMethodBinding(MethodBinding closestMatch, char[] selector,
36                         TypeBinding[] args, int problemId) {
37                 this(selector, args, problemId);
38                 this.closestMatch = closestMatch;
39                 if (closestMatch != null)
40                         this.declaringClass = closestMatch.declaringClass;
41         }
42
43         /*
44          * API Answer the problem id associated with the receiver. NoError if the
45          * receiver is a valid binding.
46          */
47
48         public final int problemId() {
49                 return problemId;
50         }
51 }