Is it possible to create a preprocessor like functionality that is available in C
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Annotations are not meant as a tool to transform code; they just add metadata to code. You can’t use annotations for conditional compilation, for example.
As Sun’s tutorial on annotations says:
Wikipedia says:
So an annotation processor plug-in is not going to be able to give you all of the functionality that the C preprocessor has.