org.peaseplate.chunk
Class AbstractBlock
java.lang.Object
org.peaseplate.chunk.AbstractChunk
org.peaseplate.chunk.AbstractBlock
- All Implemented Interfaces:
- BlockHead, Chunk
- Direct Known Subclasses:
- AbstractIfBlock, ElseBlock, MacroBlock, WhileBlock, WithBlock, WithEachBlock
public abstract class AbstractBlock
- extends AbstractChunk
- implements BlockHead
The abstract implementation of the block head.
- Author:
- Manfred HANTSCHEL
Method Summary |
Chunk[] |
getBlock()
Returns the head of the sub block chain. |
void |
renderBlock(BuildContext context,
java.io.Writer writer)
Renders the sub block to the specified writer using the specified
template context |
void |
setBlock(Chunk[] block)
|
java.lang.String |
toString()
Returns a meaningful representation of this chunk |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
AbstractBlock
public AbstractBlock(TemplateLocator locator,
int line,
int column)
getBlock
public Chunk[] getBlock()
- Description copied from interface:
BlockHead
- Returns the head of the sub block chain.
- Specified by:
getBlock
in interface BlockHead
- Returns:
- the head of the block
- See Also:
BlockHead.getBlock()
setBlock
public void setBlock(Chunk[] block)
throws java.lang.IllegalStateException
- Specified by:
setBlock
in interface BlockHead
- Throws:
java.lang.IllegalStateException
- See Also:
BlockHead.setBlock(org.peaseplate.chunk.Chunk[])
renderBlock
public void renderBlock(BuildContext context,
java.io.Writer writer)
throws TemplateException,
java.io.IOException
- Description copied from interface:
BlockHead
- Renders the sub block to the specified writer using the specified
template context
- Specified by:
renderBlock
in interface BlockHead
- Parameters:
context
- the contextwriter
- the writer
- Throws:
TemplateException
- on occasion
java.io.IOException
- on occasion- See Also:
BlockHead.renderBlock(BuildContext, java.io.Writer)
toString
public java.lang.String toString()
- Description copied from interface:
Chunk
- Returns a meaningful representation of this chunk
- Specified by:
toString
in interface Chunk
- Overrides:
toString
in class java.lang.Object
- Returns:
- a meaningful representation of this chunk
- See Also:
Object.toString()
Copyright © 2008. All Rights Reserved.