多行Java的String 任何未来计划。
难的是如何写一个实用工具,将执行以下操作?
How difficult is it to write a utility that does the following?
@AllYouCanEatText(return="query") private String getQuery(String empid, String[] columns) { String query; /* SELECT ${columns} FROM Employees WHERE empid = ${empid} ; */ return query; };当然,在此之前我在枪管前跳,我应该问 - 就是这样一个工具已经可用?如果是这样,在哪里?
Of course, before I jump in front of the barrel, I should have asked - Is such a utility already available? If so, where?
目前的问题实际上是 - 我怎么在编译时读取反射的评论部分。作为与反思和注释处理熟悉的我(惨淡)水平的指标 - 我用反思过去的时间运行时间阅读方法。是编译时反射可能吗?
The issue at hand is actually - how do I read the comments section in reflection during compile time. As an indication of my (dismal) level of familiarity with Reflection and annotation processing - the last time I used reflection was run-time to read methods. Is compile-time reflection possible?
是任何人都有意与我分享一个谷歌code项目做到这一点?可能已经有一个Apache项目在进行中?
Is anyone interested in sharing a google code project with me to do this? May be there is already an apache project afoot?
推荐答案我碰到这个来了,而以前,从来没有使用过自己,但我认为它的您正在寻找的 www.adrianwalker/2011/12/java-multiline-string.html
I came across this a while ago, never used it myself, but I think its what you are looking for www.adrianwalker/2011/12/java-multiline-string.html
更多推荐
对于多行文本Java注释工具
发布评论