Package org.apache.velocity.runtime.parser.node

# Class ASTBlock

java.lang.Object
org.apache.velocity.runtime.parser.node.SimpleNode
org.apache.velocity.runtime.parser.node.ASTBlock

All Implemented Interfaces:
  `Cloneable`, `Node`, `Renderable`

public class ASTBlock extends SimpleNode

## Field Summary

Fields
Modifier and Type
Field
Description
`boolean`
`endsWithNewline`

### Fields inherited from class org.apache.velocity.runtime.parser.node.SimpleNode

`children, column, first, firstImage, id, info, invalid, last, lastImage, line, literal, log, parent, parser, rsvc, state, template`

## Constructor Summary

Constructors
Constructor
Description
`ASTBlock(int id)`
`ASTBlock(Parser p, int id)`

## Method Summary

Modifier and Type
Method
Description
`String`
`getPostfix()`
get indentation postfix
`String`
`getPrefix()`
get indentation prefix
`Object`
`init(InternalContextAdapter context, Object data)`
`Object`
`jjtAccept(StandardParserVisitor visitor, Object data)`
`boolean`
`render(InternalContextAdapter context, Writer writer)`
`void`
`setMorePostfix(String morePosffix)`
`void`
`setPostfix(String postfix)`
set indentation postfix
`void`
`setPrefix(String prefix)`
set indentation prefix

### Methods inherited from class org.apache.velocity.runtime.parser.node.SimpleNode

`childrenAccept, cleanupParserAndTokens, clone, clone, dump, dump, dump, evaluate, execute, getColumn, getFirstToken, getFirstTokenImage, getInfo, getLastToken, getLastTokenImage, getLine, getLocation, getParser, getRuntimeServices, getTemplate, getTemplateName, getType, isInvalid, jjtAddChild, jjtClose, jjtGetChild, jjtGetNumChildren, jjtGetParent, jjtOpen, jjtSetParent, literal, saveTokenImages, setFirstToken, setInfo, setInvalid, toString, toString, value`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Field Details

### endsWithNewline

public boolean endsWithNewline

## Constructor Details

### ASTBlock

public ASTBlock(int id)

Parameters:
  `id` -

### ASTBlock

public ASTBlock(Parser p, int id)

Parameters:
  `p` -
  `id` -

## Method Details

### jjtAccept

public Object jjtAccept(StandardParserVisitor visitor, Object data)

Specified by:
  `jjtAccept` in interface `Node`
Overrides:
  `jjtAccept` in class `SimpleNode`
Parameters:
  `visitor` -
  `data` -
Returns:
  The Node execution result object.
See Also:
  - `SimpleNode.jjtAccept(org.apache.velocity.runtime.parser.node.StandardParserVisitor, java.lang.Object)`

### init

public Object init(InternalContextAdapter context, Object data) throws TemplateInitException

Specified by:
  `init` in interface `Node`
Overrides:
  `init` in class `SimpleNode`
Parameters:
  `context` -
  `data` -
Returns:
  The init result.
Throws:
  `TemplateInitException`
See Also:
  - `Node.init(org.apache.velocity.context.InternalContextAdapter, java.lang.Object)`

### setPrefix

public void setPrefix(String prefix)
set indentation prefix

Parameters:
  `prefix` -

### getPrefix

public String getPrefix()
get indentation prefix

Returns:
  indentation prefix

### setMorePostfix

public void setMorePostfix(String morePosffix)

### setPostfix

public void setPostfix(String postfix)
set indentation postfix

Parameters:
  `postfix` -

### getPostfix

public String getPostfix()
get indentation postfix

Returns:
  indentation prefix

### render

public boolean render(InternalContextAdapter context, Writer writer) throws IOException, MethodInvocationException, ResourceNotFoundException, ParseErrorException

Specified by:
  `render` in interface `Node`
Specified by:
  `render` in interface `Renderable`
Overrides:
  `render` in class `SimpleNode`
Parameters:
  `context` -
  `writer` -
Returns:
  True if the node rendered successfully.
Throws:
  `IOException`
  `MethodInvocationException`
  `ResourceNotFoundException`
  `ParseErrorException`
See Also:
  - `SimpleNode.render(org.apache.velocity.context.InternalContextAdapter, java.io.Writer)`