JET 模板接受两个特别标记注释的第一个非空白行中。 标记 '@ 头' 将导致要发出作为生成的 Java 类文件标头注释的注释。 这可用于生成的 Java 代码中插入版权通告。 标记 @ class 将导致要发出为类生成的 Java 类的 Java 文档注释的注释。
有效的评论
注释可能会跨越几个的行,并可能包含的任何文本。 以下是 JET 评论的示例:
<%-- @header This comment will appear as the file header comment in the generated Java code --%> <%-- @class This comment will appear as the Java class doc comment in the generated Java code --%> <%-- This comment will not appear in the template output --%> <%-- This directive is not used <%@taglib id="org.eclipse.jet.controlTags" prefix="cc"%> --%>
无效的评论
注释可能不会出现在其他 JET 元素内。 以下是非法的评论:
<%@taglib id="org.eclipse.jet.controlTags" <%-- illegal comment --%> prefix="cc" %>
转义字符的注释
若要发出的字符 <%-- 一的模板输出输入 <\%--。 发出 --%>,输入 --%\>。
以下是一个转义的 JET 评论的一个示例:
<\%-- this will show in the template output --%\>