开发者

How to customize JAutodoc templates

I've just starting using JAutodoc which is really rather nice. I'm now customizing the output and was wondering if its possible to customize the type comment based on the name of the type. Essentially, I'm looking to have one comment for JUnit test classess (whose class names all begin "Test...") and another type comment for non unit t开发者_运维百科est classes. Is it possible to have a condition based on substring matching on the class name? Basic psuedo-code would be (note, this doesn't work):

/**
#if (${e.g(1)} startsWith 'Test')
* I'm a JUnit test
#else
* I'm not a JUnit test class 
#end
*/


Create a new Type Template.

Name: JUnit Test
Pattern: Test(.+)
Example: TestMyClass

/**
 * I'm a JUnit test for ${e.g(1)}.
 */
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜