KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > internal > core > ResolvedBinaryMethod


1 /*******************************************************************************
2  * Copyright (c) 2004, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.jdt.internal.core;
12
13 /**
14  * Handle representing a binary method that is resolved.
15  * The uniqueKey contains the genericSignature of the resolved method. Use BindingKey to decode it.
16  */

17 public class ResolvedBinaryMethod extends BinaryMethod {
18     
19     private String JavaDoc uniqueKey;
20     
21     /*
22      * See class comments.
23      */

24     public ResolvedBinaryMethod(JavaElement parent, String JavaDoc name, String JavaDoc[] parameterTypes, String JavaDoc uniqueKey) {
25         super(parent, name, parameterTypes);
26         this.uniqueKey = uniqueKey;
27     }
28     /* (non-Javadoc)
29      * @see org.eclipse.jdt.internal.core.BinaryMethod#getKey()
30      */

31     public String JavaDoc getKey() {
32         return this.uniqueKey;
33     }
34     /* (non-Javadoc)
35      * @see org.eclipse.jdt.core.IMethod#isResolved()
36      */

37     public boolean isResolved() {
38         return true;
39     }
40     
41     /**
42      * @private Debugging purposes
43      */

44     protected void toStringInfo(int tab, StringBuffer JavaDoc buffer, Object JavaDoc info, boolean showResolvedInfo) {
45         super.toStringInfo(tab, buffer, info, showResolvedInfo);
46         if (showResolvedInfo) {
47             buffer.append(" {key="); //$NON-NLS-1$
48
buffer.append(this.uniqueKey);
49             buffer.append("}"); //$NON-NLS-1$
50
}
51     }
52     
53     public JavaElement unresolved() {
54         SourceRefElement handle = new BinaryMethod(this.parent, this.name, this.parameterTypes);
55         handle.occurrenceCount = this.occurrenceCount;
56         return handle;
57     }
58 }
59
Popular Tags