Annotation for parameter [message #634113] |
Wed, 20 October 2010 10:35  |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.06446 seconds