org.brains2b.typewriter
Class BlockTemplate

java.lang.Object
  extended byorg.brains2b.typewriter.ContentTemplate
      extended byorg.brains2b.typewriter.BlockTemplate
All Implemented Interfaces:
Template

public class BlockTemplate
extends ContentTemplate

Simplest implementation of ContentTemplate to write blocks of code to the output (used for finally, final and static blockstatements)

Version:
1.00 [26-07-2006]
Author:
dennis@brains2b.nl

Field Summary
 
Fields inherited from class org.brains2b.typewriter.ContentTemplate
m_content
 
Constructor Summary
BlockTemplate(java.lang.String blockId)
          Constructor
 
Method Summary
 void write(java.io.PrintWriter writer, int indent)
          overwrite this to implement a content types specific needs and call super.write(PrintWriter,int) to write out the content for this method.
 
Methods inherited from class org.brains2b.typewriter.ContentTemplate
addImport, addText, createFor, createIf, createTry, createWhile, getContent, getParent, makeInstance, makeInstance, makeInstance, setContent, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BlockTemplate

public BlockTemplate(java.lang.String blockId)
Constructor

Parameters:
blockId - String a valid keyword for a block: final,finally,static,synchronized,else, etc
Method Detail

write

public void write(java.io.PrintWriter writer,
                  int indent)
overwrite this to implement a content types specific needs and call super.write(PrintWriter,int) to write out the content for this method.

Specified by:
write in interface Template
Overrides:
write in class ContentTemplate
See Also:
Template.write(java.io.PrintWriter, int)