Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Annotation for parameter
Annotation for parameter [message #634113] Wed, 20 October 2010 10:35 Go to next message
Eclipse UserFriend
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 13:35 Go to previous message
Eclipse UserFriend
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: Tue Jul 01 17:02:28 EDT 2025

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

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

Back to the top