Break (Velocity 1.7 API)
Keywords: org.apache.velocity.runtime.directive.Break class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.velocity.runtime.directive
Class Break

    java.lang.Object
      org.apache.velocity.runtime.directive.Directive
          org.apache.velocity.runtime.directive.Break

All Implemented Interfaces:
  Cloneable, DirectiveConstants

public class Break
extends Directive

Break directive used for interrupting scopes.

Version:
  $Id$
Author:
  Jarkko Viinamaki, Nathan Bubna

Field Summary

Fields inherited from class org.apache.velocity.runtime.directive.Directive
`rsvc`

Fields inherited from interface org.apache.velocity.runtime.directive.DirectiveConstants
`BLOCK, LINE`

Constructor Summary
`Break()`

Method Summary
`String` | `getName()` Return name of this directive.
`int` | `getType()` Return type of this directive.
`void` | `init(RuntimeServices rs, InternalContextAdapter context, Node node)` simple init - init the tree and get the elementKey from the AST
`boolean` | `isScopeProvided()` Since there is no processing of content, there is never a need for an internal scope.
`boolean` | `render(InternalContextAdapter context, 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`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Break

    public Break()

Method Detail

### getName

    public 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.

### init

    public void init(RuntimeServices rs,
                     InternalContextAdapter context,
                     Node node)

  simple init - init the tree and get the elementKey from the AST

  Overrides:
    `init` in class `Directive`
  Parameters:
    `rs` -
    `context` -
    `node` -
  Throws:
    `TemplateInitException`

### render

    public boolean render(InternalContextAdapter context,
                          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.

  Specified by:
    `render` in class `Directive`
  Parameters:
    `context` -
    `writer` -
    `node` -
  Returns:
    never, always throws a StopCommand

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2010 Apache Software Foundation. All Rights Reserved.