org.webmacro.directive
Class CommentDirective
java.lang.Object
org.webmacro.directive.Directive
org.webmacro.directive.CommentDirective
- All Implemented Interfaces:
- Macro, Visitable
- public class CommentDirective
- extends Directive
Allows a template writer to make a block comment.
Nested classes inherited from class org.webmacro.directive.Directive |
Directive.ArgDescriptor, Directive.AssignmentArg, Directive.BlockArg, Directive.ConditionArg, Directive.ExactlyOneChoice, Directive.FormalArgListArg, Directive.KeywordArg, Directive.LiteralBlockArg, Directive.LValueArg, Directive.NameArg, Directive.NotSimpleVariableBuildException, Directive.NotVariableBuildException, Directive.OptionalGroup, Directive.OptionalRepeatingSubdirective, Directive.OptionalSubdirective, Directive.OptionChoice, Directive.QuotedStringArg, Directive.RValueArg, Directive.SingleOptionChoice, Directive.StringArg, Directive.Subdirective |
Fields inherited from class org.webmacro.directive.Directive |
ArgType_ARGLIST, ArgType_ASSIGN, ArgType_BLOCK, ArgType_CHOICE, ArgType_CONDITION, ArgType_GROUP, ArgType_KEYWORD, ArgType_LITBLOCK, ArgType_LVALUE, ArgType_NAME, ArgType_QUOTEDSTRING, ArgType_RVALUE, ArgType_STRING, ArgType_SUBDIRECTIVE |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CommentDirective
public CommentDirective()
getDescriptor
public static DirectiveDescriptor getDescriptor()
build
public java.lang.Object build(DirectiveBuilder builder,
BuildContext bc)
throws BuildException
- Description copied from class:
Directive
- Directives must implement a build() method. The build method
should examine the directive arguments (available through the
DirectiveBuilder) and return a macro describing the built
directive. In most cases, build() will just set up the
directive's private fields and return 'this', but in some
cases, no macro needs be returned (such as directives with only
side effects on the build context) or some other macro may be
returned (such as in the case of "#if (true) { }" -- no IfDirective
object need be returned, just return the block.)
- Specified by:
build
in class Directive
- Throws:
BuildException
write
public void write(FastWriter out,
Context context)
throws PropertyException,
java.io.IOException
- Description copied from interface:
Macro
- Interpret the directive and write it out, using the values in
the supplied context as appropriate.
- Throws:
java.io.IOException
- if we could not successfully write to out
PropertyException
- if required data was missing from context
accept
public void accept(TemplateVisitor v)
- Specified by:
accept
in interface Visitable
- Overrides:
accept
in class Directive
Copyright © 1999-2006 WebMacro. All Rights Reserved.