|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.brains2b.typewriter.ContentTemplate
org.brains2b.typewriter.TryTemplate
Create a Try statement.
Field Summary |
Fields inherited from class org.brains2b.typewriter.ContentTemplate |
m_content |
Constructor Summary | |
TryTemplate(java.lang.Class exceptionClass)
Constructor for TryTemplate. |
|
TryTemplate(java.lang.String exceptionClassName)
Constructor for TryTemplate. |
Method Summary | |
ExceptionTemplate |
createException(java.lang.String exceptionClassName)
create a new Exception for this Try statement. |
BlockTemplate |
createFinally()
create a finally block for this Exception |
ExceptionTemplate |
getDefaultException()
get the Exception this Try statement was created with |
void |
write(java.io.PrintWriter writer,
int indent)
write the TryStatement to the PrintWriter. |
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 |
public TryTemplate(java.lang.Class exceptionClass)
exceptionClass
- Class, the class for the Exception this
try should catch. You can add more Exceptions by using createException(String)createException(java.lang.String)
public TryTemplate(java.lang.String exceptionClassName)
exceptionClassName
- String, a String representing the complete class name, including package of the
Exception this try should catch. You can add more Exceptions by using createException(String)createException(java.lang.String)
Method Detail |
public void write(java.io.PrintWriter writer, int indent)
write
in interface Template
write
in class ContentTemplate
Template.write(PrintWriter, int)
public ExceptionTemplate getDefaultException()
public ExceptionTemplate createException(java.lang.String exceptionClassName)
exceptionClassName
- String, the fully qualified class name of this Exception
public BlockTemplate createFinally()
finally
block
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |