Class Stop
- java.lang.Object
-
- org.apache.velocity.runtime.directive.Directive
-
- org.apache.velocity.runtime.directive.Stop
-
- All Implemented Interfaces:
java.lang.Cloneable
,DirectiveConstants
public class Stop extends Directive
This class implements the #stop directive which allows a user to stop the merging and rendering process. The #stop directive will accept a single message argument with info about the reason for stopping.
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
hasMessage
private static StopCommand
STOP_ALL
-
Fields inherited from interface org.apache.velocity.runtime.directive.DirectiveConstants
BLOCK, LINE
-
-
Constructor Summary
Constructors Constructor Description Stop()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getName()
Return name of this directive.int
getType()
Return type of this directive.void
init(RuntimeServices rs, InternalContextAdapter context, Node node)
How this directive is to be initialized.boolean
isScopeProvided()
Since there is no processing of content, there is never a need for an internal scope.boolean
render(InternalContextAdapter context, java.io.Writer writer, Node node)
How this directive is to be rendered-
Methods inherited from class org.apache.velocity.runtime.directive.Directive
getColumn, getLine, getScopeName, getTemplateName, makeScope, postRender, preRender, setLocation, setLocation
-
-
-
-
Field Detail
-
STOP_ALL
private static final StopCommand STOP_ALL
-
hasMessage
private boolean hasMessage
-
-
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:
isScopeProvided
in 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)
Description copied from class:Directive
How this directive is to be initialized.
-
render
public boolean render(InternalContextAdapter context, java.io.Writer writer, Node node)
Description copied from class:Directive
How this directive is to be rendered
-
-