Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » How to get annotation information from a java source-file?
How to get annotation information from a java source-file? [message #227110] Tue, 04 April 2006 09:41
Eclipse UserFriend
Originally posted by: judith.wiesinger.fh-hagenberg.at

Hi everybody,

I am writing a validator for a self-programmed editor. Therefore, I need
the annotations from classes and methods. Since those classes are not in
the classpath of my validator, I can't use the following:

Class<?> myType = Class.forName("mypackage.MyType");
Annotation[] myAnnotations = myType.getAnnotations();
Method[] myMethods = myType.getMethods();
Annotation[] myAnnotations2 = myMethods[0].getAnnotations();

Do you know if and how I can get this information from
org.eclipse.jdt.core.IType or where else can I get it from?

Thanks for your consideration!

Judith
Previous Topic:Get 'fully qualifed' return type name from IMethod
Next Topic:Discovering whether a project exists in the current workspace
Goto Forum:
  


Current Time: Thu Apr 25 23:06:59 GMT 2024

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

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

Back to the top