Bug 124801 - IType.getMethod(String,String[]) not accepting signatures with '/'
Summary: IType.getMethod(String,String[]) not accepting signatures with '/'
Status: VERIFIED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.6 M1   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-22 05:44 EST by Christopher Daly CLA
Modified: 2009-08-04 08:45 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher Daly CLA 2006-01-22 05:44:59 EST
I'm observing that for binary types and methods the IMethod.getSignature() returns something like this:

  (Ljava/lang/String;)Ljava/lang/reflect/Field;

While IMethod.getParameterTypes() returns a String[] with the signatures like this:

  Ljava.lang.String;

Note '/' in the first case and '.' in the second.  I regarded this as merely odd, because according to the documentation in the Signature class it seems both forms are valid.

However when I go searching for methods using IType.getMethod(String,String[]) I notice that it only accepts signatures with '.'.  If you call it with '/' in the signatures you will get back an IMethod for which IMethod.exists() returns false.

So is this a bug, or am I misunderstanding something about the use of '.' and '/' in signatures?
Comment 1 Olivier Thomann CLA 2009-06-25 11:35:24 EDT
All methods on the Signature class expect dot based signatures.
Closing as INVALID.
Comment 2 Frederic Fusier CLA 2009-08-04 08:45:01 EDT
Verified for 3.6M1