org.brains2b.typewriter
Interface Template

All Known Implementing Classes:
ClassTemplate, CommentTemplate, ContentTemplate, MemberTemplate

public interface Template

Definition of a Template used both for writing the Class and the containing elements

Version:
0.10 [28-10-2002]
Author:
dennis@brains2b.nl

Method Summary
 void addImport(java.lang.String name)
          add an String as import to the top class of this element
 Template getParent()
          get the direct parent of this element.
 void setParent(Template t)
          set the direct parent of this element The parent can be the class, method, try element or loop elements
 void write(java.io.PrintWriter writer, int indent)
          write the template information to the PrintWriter at the given indention.
 

Method Detail

write

public void write(java.io.PrintWriter writer,
                  int indent)
write the template information to the PrintWriter at the given indention.

Indention is multiplied by 4 to supply the spaces for the indention.

Parameters:
writer - PrintWriter, an initialized PrintWriter to write this element of the Class to
indent - int, the indention for this element.

Value is multiplied by four to give the number of spaces used for indention


getParent

public Template getParent()
get the direct parent of this element.

This can be the class, method, try element or loop elements

Returns:
Template, the parent of this element

setParent

public void setParent(Template t)
set the direct parent of this element

The parent can be the class, method, try element or loop elements

Parameters:
t - Template, the parent of this element

addImport

public void addImport(java.lang.String name)
add an String as import to the top class of this element

Parameters:
name - String, the fully qualified class name. Could be used to enter the complete package by adding *