Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Annotation for parameter
Annotation for parameter [message #634113] Wed, 20 October 2010 14:35 Go to next message
Benson Ning is currently offline Benson NingFriend
Messages: 14
Registered: July 2009
Junior Member
Hi,

I have a method like this:

@Inject
public Test(@Default Test1 processor) {...}

Does JDT model support that parameter annotation (@Default)? For example, I can get annotation (@Inject) for the method (Test) by calling ((IAnnotatable)method).getAnnotations(), is there a way to get @Default for the parameter(processor)?

Thanks for your time
Re: Annotation for parameter [message #634863 is a reply to message #634113] Sun, 24 October 2010 17:35 Go to previous message
Stephan Herrmann is currently offline Stephan HerrmannFriend
Messages: 1853
Registered: July 2009
Senior Member
Benson Ning wrote on Wed, 20 October 2010 16:35
Hi,

I have a method like this:

@Inject
public Test(@Default Test1 processor) {...}

Does JDT model support that parameter annotation (@Default)? For example, I can get annotation (@Inject) for the method (Test) by calling ((IAnnotatable)method).getAnnotations(), is there a way to get @Default for the parameter(processor)?

Thanks for your time


AFAICS the model doesn't have that level of detail, parameters
are just represented by name and type (both as strings).

If you need more details you need the dom, where
SingleVariableDeclaration.modifiers() should include annotations.

HTH,
Stephan
Previous Topic:Eclipse 3.6 Can not Install Hibernate tools ???
Next Topic:Eclipse 3.1 and Java 1.6
Goto Forum:
  


Current Time: Fri Apr 26 13:30:14 GMT 2024

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

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

Back to the top