A B C D E F G I K L M O S T W

A

addException(String) - Method in class org.brains2b.typewriter.MethodTemplate
add a throws clause to the method Call this for every Exception this method can throw
addImport(String) - Method in class org.brains2b.typewriter.ClassTemplate
add an import to this ClassTemplate if it has no parent (is not an Innerclass).
addImport(String) - Method in class org.brains2b.typewriter.CommentTemplate
add an String as import to the top class of this element
addImport(String) - Method in class org.brains2b.typewriter.ContentTemplate
 
addImport(String) - Method in class org.brains2b.typewriter.MemberTemplate
add an String as import to the top class of this element
addImport(String) - Method in interface org.brains2b.typewriter.Template
add an String as import to the top class of this element
addInterface(String) - Method in class org.brains2b.typewriter.ClassTemplate
Add a interface to this class by supplying its full class name
addText(String) - Method in class org.brains2b.typewriter.CommentTemplate
add a comment line to the content of this template.
addText(String) - Method in class org.brains2b.typewriter.ContentTemplate
add a line to the content of this template.

B

BlockTemplate - class org.brains2b.typewriter.BlockTemplate.
Simplest implementation of ContentTemplate to write blocks of code to the output (used for finally, final and static blockstatements)
BlockTemplate(String) - Constructor for class org.brains2b.typewriter.BlockTemplate
Constructor

C

ClassTemplate - class org.brains2b.typewriter.ClassTemplate.
Template for creating a complete class file call the to write a class to a specified path, including the correct indention packagename,imports,etc.
ClassTemplate(ClassTemplate, String, String, String[]) - Constructor for class org.brains2b.typewriter.ClassTemplate
Constructor for creating a ClassTemplate for an Innerclass
ClassTemplate(String, String, String[]) - Constructor for class org.brains2b.typewriter.ClassTemplate
Constructor for creating a ClassTemplate
ClassTemplate(String, String, String, String[]) - Constructor for class org.brains2b.typewriter.ClassTemplate
Constructor for creating a ClassTemplate
CommentTemplate - class org.brains2b.typewriter.CommentTemplate.
Create a comment in a ClassTemplate TODO this should also be used to create Javadoc and comments for methods
CommentTemplate() - Constructor for class org.brains2b.typewriter.CommentTemplate
Constructor
ContentTemplate - class org.brains2b.typewriter.ContentTemplate.
Abstract ContentTemplate which is the basis for most of what a java method can contain Provides methods for creating contents for a method for conditions, loops and exceptions Every class which extends this should implement it's own write(PrintWriter,indent) method and call super.write(PrintWriter,indent) to write out the content of this method
ContentTemplate() - Constructor for class org.brains2b.typewriter.ContentTemplate
 
compareTo(Object) - Method in class org.brains2b.typewriter.MethodTemplate
compare this object to another MethodTemplate Compares on the following properties Modifiers, public goes for protected goes for private Name of the method Number of arguments to this method, smaller number before larger
createComment() - Method in class org.brains2b.typewriter.ClassTemplate
create a comment template for this class file
createConstructor(String[]) - Method in class org.brains2b.typewriter.ClassTemplate
create a constructor for this class template
createConstructor(String[][]) - Method in class org.brains2b.typewriter.ClassTemplate
create a constructor for this class template
createElse() - Method in class org.brains2b.typewriter.IfTemplate
create an else statement for this condition
createException(String) - Method in class org.brains2b.typewriter.TryTemplate
create a new Exception for this Try statement.
createFinally() - Method in class org.brains2b.typewriter.TryTemplate
create a finally block for this Exception
createFor(String) - Method in class org.brains2b.typewriter.ContentTemplate
create a LoopTemplate for a for-next-loop within this content
createIf(String) - Method in class org.brains2b.typewriter.ContentTemplate
create an IfTemplate for a condition-statement within this content
createInnerClass(String, String, String[]) - Method in class org.brains2b.typewriter.ClassTemplate
create an inner class template in this ClassTemplate
createMember(String, String, Object) - Method in class org.brains2b.typewriter.ClassTemplate
create a private member variable in this ClassTemplate
createMember(int, String, String, Object) - Method in class org.brains2b.typewriter.ClassTemplate
create a private member variable in this ClassTemplate
createMember(String, String, Object, boolean) - Method in class org.brains2b.typewriter.ClassTemplate
 
createMember(String, String) - Method in class org.brains2b.typewriter.ClassTemplate
create a private member variable in this ClassTemplate without an initial value
createMethod(String, String[]) - Method in class org.brains2b.typewriter.ClassTemplate
create a method with public access and no return value for the given name and with the parameters If a method with the exact name and parameters already exist this method is returned instead of creating a new one
createMethod(String, String, String[]) - Method in class org.brains2b.typewriter.ClassTemplate
create a method with public access and the given type of return value for the given name and with the parameters If a method with the exact name and parameters already exist this method is returned instead of creating a new one
createMethod(int, String, String, String[]) - Method in class org.brains2b.typewriter.ClassTemplate
create a method with the given access, the given type of return value for the given name and with the parameters If a method with the exact name and parameters already exist this method is returned instead of creating a new one
createMethod(int, String, String, String[][]) - Method in class org.brains2b.typewriter.ClassTemplate
create a method with the given access, the given type of return value for the given name and with the parameters If a method with the exact name and parameters already exist this method is returned instead of creating a new one
createTry(String) - Method in class org.brains2b.typewriter.ContentTemplate
create a TryTemplate for a try-catch-block within this content
createWhile(String) - Method in class org.brains2b.typewriter.ContentTemplate
create a LoopTemplate for a while-loop within this content

D

DO - Static variable in class org.brains2b.typewriter.LoopTemplate
constant to define a do while loop

E

ExceptionTemplate - class org.brains2b.typewriter.ExceptionTemplate.
Template for creating a "} catch ([Exception] [ex]) {" statement in a template This Template will make an variable name out of the Exception itself by taking all capital letters in an exception name and putting them one after another and finally adding ex to it.
ExceptionTemplate(String) - Constructor for class org.brains2b.typewriter.ExceptionTemplate
Constructor for ExceptionTemplate.

F

FOR - Static variable in class org.brains2b.typewriter.LoopTemplate
constant to define a for loop

G

getClassName(Class) - Static method in class org.brains2b.typewriter.TypeWriterHelper
get the name without the package from the class
getClassName(String) - Static method in class org.brains2b.typewriter.TypeWriterHelper
get the name without the package from the String representing a class
getCompleteFile() - Method in class org.brains2b.typewriter.ClassTemplate
get the filename of the completed file.
getCondition() - Method in class org.brains2b.typewriter.IfTemplate
get the condition.
getContent() - Method in class org.brains2b.typewriter.CommentTemplate
get the content for this template The vector will either contain Strings or other ContentTemplates
getContent() - Method in class org.brains2b.typewriter.ContentTemplate
get the content for this template The list will either contain Strings or other ContentTemplates
getDefaultException() - Method in class org.brains2b.typewriter.TryTemplate
get the Exception this Try statement was created with
getInitialValue() - Method in class org.brains2b.typewriter.MemberTemplate
get the initial value for this member
getModifiers(int) - Static method in class org.brains2b.typewriter.TypeWriterHelper
get a String representation for the sum of modifiers as defined in java.lang.reflect.Modifier supports: private public protected final static
getName() - Method in class org.brains2b.typewriter.ClassTemplate
get the name of this class
getName() - Method in class org.brains2b.typewriter.MethodTemplate
get the name of this method
getPackage() - Method in class org.brains2b.typewriter.ClassTemplate
get the package for this class
getParent() - Method in class org.brains2b.typewriter.ClassTemplate
get the direct parent of this element.

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

getParent() - Method in class org.brains2b.typewriter.CommentTemplate
get the direct parent of this element.

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

getParent() - Method in class org.brains2b.typewriter.ContentTemplate
get the direct parent of this element.

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

getParent() - Method in class org.brains2b.typewriter.MemberTemplate
get the direct parent of this element.

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

getParent() - Method in interface org.brains2b.typewriter.Template
get the direct parent of this element.
getReturnType() - Method in class org.brains2b.typewriter.MethodTemplate
get the return type of this method
getType() - Method in class org.brains2b.typewriter.MemberTemplate
 

I

IfTemplate - class org.brains2b.typewriter.IfTemplate.
Template for creating conditions and else statements in another ContentTemplate
IfTemplate(String) - Constructor for class org.brains2b.typewriter.IfTemplate
Constructor for IfTemplate.
invokeMethod(String, String, Object) - Method in class org.brains2b.typewriter.MethodTemplate
invoke a method from another instance of an object
invokeMethod(String, String, Object[]) - Method in class org.brains2b.typewriter.MethodTemplate
invoke a method from an instance of an object
isConstructor() - Method in class org.brains2b.typewriter.MethodTemplate
check if this method is a constrcutor instead of a method
isMethodReserved(String) - Static method in class org.brains2b.typewriter.KeyWords
check if a String is a Java reserved method Only one will return true at the moment getClass()
isReserved(String) - Static method in class org.brains2b.typewriter.KeyWords
check if a String is a Java reserved word/keyword

K

KeyWords - class org.brains2b.typewriter.KeyWords.
Class that implements single static functions isReserved and isMethodReserved which checks if a String is a Java reserved word.

L

Literal - class org.brains2b.typewriter.Literal.
Literal is a simple wrapper class which makes sure that a value supplied is written into the template as is for both String and char.
Literal(String) - Constructor for class org.brains2b.typewriter.Literal
Constructor
Literal(char) - Constructor for class org.brains2b.typewriter.Literal
Constructor
LoopTemplate - class org.brains2b.typewriter.LoopTemplate.
Create a loop element in a method A loop can either be DO WHILE FOR
LoopTemplate(int, String) - Constructor for class org.brains2b.typewriter.LoopTemplate
Constructor

M

MemberTemplate - class org.brains2b.typewriter.MemberTemplate.
Template for creating a Member in a class
MemberTemplate(String, String) - Constructor for class org.brains2b.typewriter.MemberTemplate
Constructor Make a private member with the given name and type
MemberTemplate(String, String, Object) - Constructor for class org.brains2b.typewriter.MemberTemplate
Constructor Make a private member with the given name and type
MemberTemplate(int, String, String) - Constructor for class org.brains2b.typewriter.MemberTemplate
Constructor Make a member with the given name and type and with the given access.
MemberTemplate(int, String, String, Object) - Constructor for class org.brains2b.typewriter.MemberTemplate
Constructor Make a member with the given name and type and with the given access and initial value.
MethodTemplate - class org.brains2b.typewriter.MethodTemplate.
Template for creating a Method in a class
MethodTemplate(ClassTemplate, int, String, String, String[]) - Constructor for class org.brains2b.typewriter.MethodTemplate
Constructor This constructor will use number "arg" arguments as parameter names, i.e. arg0, arg1
MethodTemplate(ClassTemplate, int, String, String, String[][]) - Constructor for class org.brains2b.typewriter.MethodTemplate
Constructor
m_content - Variable in class org.brains2b.typewriter.CommentTemplate
 
m_content - Variable in class org.brains2b.typewriter.ContentTemplate
 
makeInstance(String, String) - Method in class org.brains2b.typewriter.ContentTemplate
create a local instance for a class by calling its constructor with the given parameter and adds it to the content
makeInstance(String, String, Object) - Method in class org.brains2b.typewriter.ContentTemplate
create a local instance for a class by calling its constructor with the given parameter and adds it to the content
makeInstance(String, String, Object[]) - Method in class org.brains2b.typewriter.ContentTemplate
Create a local instance for a class by calling its constructor with the given parameters and adds it to the content
makeString(String) - Static method in class org.brains2b.typewriter.TypeWriterHelper
make a String between quotes from the supplied String

O

org.brains2b.typewriter - package org.brains2b.typewriter
 

S

setCondition(String) - Method in class org.brains2b.typewriter.IfTemplate
set the expression to evaluate for this condition
setCondition(String) - Method in class org.brains2b.typewriter.LoopTemplate
set the condition.
setConstructor(boolean) - Method in class org.brains2b.typewriter.MethodTemplate
set this Methodtemplate to be a constructor instead of a normal method
setContent(List) - Method in class org.brains2b.typewriter.CommentTemplate
set the content for this Template The vector should contain either contain Strings or other ContentTemplates
setContent(List) - Method in class org.brains2b.typewriter.ContentTemplate
set the content for this Template The List should contain either contain Strings or other ContentTemplates
setInitialValue(Object) - Method in class org.brains2b.typewriter.MemberTemplate
set the initial value for this member
setModifiers(int) - Method in class org.brains2b.typewriter.MethodTemplate
set the modifiers for this method
setName(String) - Method in class org.brains2b.typewriter.ClassTemplate
set the name of the class
setName(String) - Method in class org.brains2b.typewriter.MethodTemplate
get the name of this method
setPackage(String) - Method in class org.brains2b.typewriter.ClassTemplate
set the package name for this class It is assumed that this is a valid package name
setParent(Template) - Method in class org.brains2b.typewriter.ClassTemplate
set the direct parent of this element

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

setParent(Template) - Method in class org.brains2b.typewriter.CommentTemplate
set the direct parent of this element

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

setParent(Template) - Method in class org.brains2b.typewriter.ContentTemplate
set the direct parent of this element

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

setParent(Template) - Method in class org.brains2b.typewriter.MemberTemplate
(non-Javadoc) set the direct parent of this element

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

setParent(Template) - Method in interface org.brains2b.typewriter.Template
set the direct parent of this element The parent can be the class, method, try element or loop elements
setReturnType(String) - Method in class org.brains2b.typewriter.MethodTemplate
set the return type of this method
setType(String) - Method in class org.brains2b.typewriter.MemberTemplate
 
spaces(int) - Static method in class org.brains2b.typewriter.TypeWriterHelper
create a String of length length filled with spaces There is a faster way to do this, by using a static char array to read from, but it is only slightly faster and consumes extra memory and more lines of code

T

Template - interface org.brains2b.typewriter.Template.
Definition of a Template used both for writing the Class and the containing elements
TryTemplate - class org.brains2b.typewriter.TryTemplate.
Create a Try statement.
TryTemplate(Class) - Constructor for class org.brains2b.typewriter.TryTemplate
Constructor for TryTemplate.
TryTemplate(String) - Constructor for class org.brains2b.typewriter.TryTemplate
Constructor for TryTemplate.
TypeWriterException - exception org.brains2b.typewriter.TypeWriterException.
Exception for problems occurring while invoking TypeWriter methodes
TypeWriterException() - Constructor for class org.brains2b.typewriter.TypeWriterException
Constructor for TypeWriterException.
TypeWriterException(String) - Constructor for class org.brains2b.typewriter.TypeWriterException
Constructor for TypeWriterException.
TypeWriterHelper - class org.brains2b.typewriter.TypeWriterHelper.
Helper library for TypeWriter
TypeWriterHelper() - Constructor for class org.brains2b.typewriter.TypeWriterHelper
 
toString() - Method in class org.brains2b.typewriter.Literal
Overwritten to represent a String between apostrofes and a char between quotes

W

WHILE - Static variable in class org.brains2b.typewriter.LoopTemplate
constant to define a while loop
write(PrintWriter, int) - Method in class org.brains2b.typewriter.BlockTemplate
overwrite this to implement a content types specific needs and call super.write(PrintWriter,int) to write out the content for this method.
write(PrintWriter, int) - Method in class org.brains2b.typewriter.ClassTemplate
write the template information to the PrintWriter at the given indention.

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

write(PrintWriter, int) - Method in class org.brains2b.typewriter.CommentTemplate
write the template information to the PrintWriter at the given indention.

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

write(PrintWriter, int) - Method in class org.brains2b.typewriter.ContentTemplate
overwrite this to implement a content types specific needs and call super.write(PrintWriter,int) to write out the content for this method.
write(PrintWriter, int) - Method in class org.brains2b.typewriter.ExceptionTemplate
overwrite this to implement a content types specific needs and call super.write(PrintWriter,int) to write out the content for this method.
write(PrintWriter, int) - Method in class org.brains2b.typewriter.IfTemplate
this implementation of write follows the rule that if this statement has an else statement which only contains another if statement the statement should read } else if ( instead of closing the else and starting with a new condition.
write(PrintWriter, int, boolean) - Method in class org.brains2b.typewriter.IfTemplate
write the if statement to the PrintWriter
write(PrintWriter, int) - Method in class org.brains2b.typewriter.LoopTemplate
 
write(PrintWriter, int) - Method in class org.brains2b.typewriter.MemberTemplate
write the template information to the PrintWriter at the given indention.

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

write(PrintWriter, int) - Method in class org.brains2b.typewriter.MethodTemplate
overwrite this to implement a content types specific needs and call super.write(PrintWriter,int) to write out the content for this method.
write(PrintWriter, int) - Method in interface org.brains2b.typewriter.Template
write the template information to the PrintWriter at the given indention.
write(PrintWriter, int) - Method in class org.brains2b.typewriter.TryTemplate
write the TryStatement to the PrintWriter.
writeClass(String) - Method in class org.brains2b.typewriter.ClassTemplate
write a class file with filename equals name+".java" to a given path If a package name is defined the appropriate directories are added to the path and if necessary created.

A B C D E F G I K L M O S T W