-
@Retention(SOURCE) @Target(TYPE) public @interface GenerateTemplate
Annotation for use on CodeDelegate subclasses to create a class body template file during compilation. This relies on the compiler in use allowing the annotation processor to load source files. Add the token values in comments. All lines betweenPXJ-BEGIN:
andPXJ-END:
will be copied into the template, excluding the lines containing the template. It is advised to write an ID for the section (eg. body, imports, etc.) after the tokens, but these are not checked in processing.{@code
-
-
Field Summary
Fields Modifier and Type Fields Description static String
TOKEN_BEGIN
Value of the starting token -PXJ-BEGIN:
static String
TOKEN_END
Value of the ending token -PXJ-END:
-
-
-
Field Detail
-
TOKEN_BEGIN
static final String TOKEN_BEGIN
Value of the starting token -PXJ-BEGIN:
-
-
-
TOKEN_END
static final String TOKEN_END
Value of the ending token -PXJ-END:
-
-
Element Detail
-
value
String value
Path, relative to the Java source file, to generate the template. The file should usually be given a.pxj
extension. It can be stored in a final static field in the class for use in the factory (see main example).- Returns:
- relative path to template file
-
-