Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jdt-core-dev] How to resolve the qualified name of a type?

All,

  I'm currently in a situation where I need to generate the
internal type signatures that will be present in a compiled
class file.  That is, given a method declaration of:

    public void someFunction(String) { ... }

  I want to be able to generate a type signature similar to
that produced by the javap utility:

    (Ljava/lang/String;)V

  Querying an IMethod for the method signature under JDT returns
the following:

    (QString;)V

  What I'd like to know is if there is a straightforward method
of resolving a type name ("String") in the context of a method
declaration or compilation unit.

  I've spent a good part of the last two days going through the
JDT developer documentation and source, trying to figure out if
there's a reasonable way to do this, and so far, I've been drawing
a blank.

  Am I missing something?  Or is this kind of capability not
generally available in the current release of JDT?

-Samrobb


Back to the top