file io - Program/Script for automatically annotating Java classes -



file io - Program/Script for automatically annotating Java classes -

i have on one thousand pojos, properties of which, need annotate per custom xml parsing annotations library made. since number of pojos large, , jaxb annotated, need automation of 2 3 tasks :

removal of "all" existing annotations re-annotating pojos 1

the rules simple (1) - delete line starts "@"

(2) complex , want start detecting "public class xyz" in java class, , annotating @beanname(beanname="xyz")

after this, action item (3), need observe datatype of variable in pojo, annotate :

@classmember(datatype = datatype.integer, membername = "tripid") public int tripid; @classmember(datatype = datatype.complex, membername = "stop") public stop stop;

i think sed script may help too, prefer java, "guess" , may need utilize reflection next steps.

thanks !

edit : understand above cases simple , can achieved using regex tools - need script/program this. if community can help me code "simple" cases this, can extend complex scenarios - "cannot" done (without lot of manual intervention) regex tools built ides.

edit 2 : have added point (3) create problem "real"

intellij's structural search , replace able help. if open write programs seek eclipse ast modification. has sample code start with.

java file-io automation annotations sed

Comments

Popular posts from this blog

delphi - blogger via idHTTP : error 400 bad request -

c++ - compiler errors when initializing EXPECT_CALL with function which has program_options::variables_map as parameter -

How do I check if an insert was successful with MySQLdb in Python? -