Class Break
- java.lang.Object
-
- org.apache.velocity.runtime.directive.Directive
-
- org.apache.velocity.runtime.directive.Break
-
- All Implemented Interfaces:
java.lang.Cloneable,DirectiveConstants
public class Break extends Directive
Break directive used for interrupting scopes.- Version:
- $Id$
-
-
Constructor Summary
Constructors Constructor Description Break()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetName()Return name of this directive.intgetType()Return type of this directive.voidinit(RuntimeServices rs, InternalContextAdapter context, Node node)simple init - init the tree and get the elementKey from the ASTbooleanisScopeProvided()Since there is no processing of content, there is never a need for an internal scope.booleanrender(InternalContextAdapter context, java.io.Writer writer, Node node)Break directive does not actually do any rendering.-
Methods inherited from class org.apache.velocity.runtime.directive.Directive
getColumn, getLine, getScopeName, getTemplateName, makeScope, postRender, preRender, setLocation, setLocation
-
-
-
-
Method Detail
-
getName
public java.lang.String getName()
Return name of this directive.
-
getType
public int getType()
Return 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:
isScopeProvidedin classDirective- Returns:
- true if there will be a scope control injected into the context when rendering this directive.
-
init
public void init(RuntimeServices rs, InternalContextAdapter context, Node node)
simple init - init the tree and get the elementKey from the AST
-
render
public boolean render(InternalContextAdapter context, java.io.Writer writer, Node node)
Break directive does not actually do any rendering. This directive throws a StopCommand which signals either the nearest Scope or the specified scope to stop rendering its content.
-
-