Created
February 24, 2012 13:18
-
-
Save ssedano/1900851 to your computer and use it in GitHub Desktop.
Naive and crappy regexp (eclipse)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Remember: does not take into account void methods (no @Produces) both out and in are the same return value. | |
(@GET(\n\s+@.*)*)\n(\s+public\s)(\w*Dto) | |
\1 @Produces(\4.MEDIA_TYPE) \3 \4 | |
(@POST(\n\s+@.*)*)\n(\s+public\s)(\w*Dto) | |
\1 @Consumes(\4.MEDIA_TYPE) @Produces(\4.MEDIA_TYPE) \3 \4 | |
(@PUT(\n\s+@.*)*)\n(\s+public\s)(\w*Dto) | |
\1 @Consumes(\4.MEDIA_TYPE) @Produces(\4.MEDIA_TYPE) \3 \4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment