Write Java Method Signature with Annotated paramaters with JDT

Posted by Scott on Stack Overflow See other posts from Stack Overflow or by Scott
Published on 2009-07-14T22:14:58Z Indexed on 2010/03/18 7:01 UTC
Read the original article Hit count: 436

Hi,

I am writing an eclipse plug-in which generates code. I am leveraging eclipse jdt to gen out classes, fields, and methods. One of the requirements I have is to generate methods with annotated paramaters...

public returnType foo(@someAnnotation int id)
{
     .....
     .....
}

Does anybody know how to write out the @someAnnotation using JDT? To write out normal parameters in JDT you could do something like the following

Signature.createTypeSignature("int", false)

© Stack Overflow or respective owner

Related posts about jdt

Related posts about eclipse