Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » How to find a Java element?
How to find a Java element? [message #203280] Thu, 12 May 2005 06:22 Go to next message
Eclipse UserFriend
Hi,

how do I find a Java element, for example an IType for a Java class, when I
only have the fully qualified class name, like "com.acme.MyClass"? Is there
a query method on the AST, for example?

Similar example: I want to find an IAttribute, using only the fully
qualified class name of the owning Java class and the name of the attribute
itself.

More complex example: the same thing for an operation inside a known class
with a known name and signature.

Cheers...
Matthias
Re: How to find a Java element? [message #203397 is a reply to message #203280] Fri, 13 May 2005 04:43 Go to previous message
Eclipse UserFriend
Try one of the IJavaProject#findType methods. Once you have the type, you
can use IType#getField or IType#getMethod to navigate.

Cheers

Tobias

"Matthias Bohlen" <infomail@mbohlen.de> wrote in message
news:d5vb9q$o18$1@news.eclipse.org...
> Hi,
>
> how do I find a Java element, for example an IType for a Java class, when
> I
> only have the fully qualified class name, like "com.acme.MyClass"? Is
> there
> a query method on the AST, for example?
>
> Similar example: I want to find an IAttribute, using only the fully
> qualified class name of the owning Java class and the name of the
> attribute
> itself.
>
> More complex example: the same thing for an operation inside a known class
> with a known name and signature.
>
> Cheers...
> Matthias
>
>
Previous Topic:How to assert?
Next Topic:Development of J2SE Version 5 Software
Goto Forum:
  


Current Time: Fri Nov 07 05:23:25 EST 2025

Powered by FUDForum. Page generated in 0.02910 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top