Class Break

  • All Implemented Interfaces:
    java.lang.Cloneable, DirectiveConstants

    public class Break
    extends Directive
    Break directive used for interrupting scopes.
    Version:
    $Id$
    • Field Detail

      • scoped

        private boolean scoped
    • Constructor Detail

      • Break

        public Break()
    • Method Detail

      • getName

        public java.lang.String getName()
        Return name of this directive.
        Specified by:
        getName in class Directive
        Returns:
        The name of this directive.
      • getType

        public int getType()
        Return type of this directive.
        Specified by:
        getType in class Directive
        Returns:
        The type of this directive.
      • isScopeProvided

        public boolean isScopeProvided()
        Since there is no processing of content, there is never a need for an internal scope.
        Overrides:
        isScopeProvided in class Directive
        Returns:
        true if there will be a scope control injected into the context when rendering this directive.
      • render

        public boolean render​(InternalContextAdapter context,
                              java.io.Writer writer,
                              Node node)
        This directive throws a StopCommand which signals either the nearest Scope or the specified scope to stop rendering its content.
        Specified by:
        render in class Directive
        Returns:
        never, always throws a StopCommand or Exception
      • checkArgs

        public void checkArgs​(java.util.ArrayList<java.lang.Integer> argtypes,
                              Token t,
                              java.lang.String templateName)
                       throws ParseException
        Called by the parser to validate the argument types
        Overrides:
        checkArgs in class Directive
        Parameters:
        argtypes - type, Array of argument types of each argument to the directive for example ParserTreeConstants.JJTWORD
        t - token of directive
        templateName - the name of the template this directive is referenced in.
        Throws:
        ParseException