com.go.beandoc
Class BeanDocContext

java.lang.Object
  |
  +--com.go.tea.runtime.DefaultContext
        |
        +--com.go.beandoc.BeanDocContext
All Implemented Interfaces:
Context, OutputReceiver, UtilityContext

public class BeanDocContext
extends DefaultContext

Context class used by the beandoc Tea templates.

Version:
8 , 8/23/00
Author:
Mark Masse

Constructor Summary
BeanDocContext(BeanDoc beandoc, java.io.File dest)
          Creates a new BeanDocContext for use with a Tea template.
 
Method Summary
 void close()
          Closes the FileWriter
 java.lang.String formatForLiteral(java.lang.String s)
          Returns a String that is same as the specified String except that all special/escape characters are formatted as if they are escaped.
 java.lang.String getMethodComment(ClassDoc classDoc, MethodDoc md)
           
 java.lang.String getMethodParamComment(ClassDoc classDoc, MethodDoc md, java.lang.String paramName)
           
 void print(java.lang.Object obj)
          The standard context method, implemented to write to the file.
 void printError(java.lang.String msg)
          Prints an error message.
 void printNotice(java.lang.String msg)
          Prints an notice message.
 void printWarning(java.lang.String msg)
          Prints an warning message.
 
Methods inherited from class com.go.tea.runtime.DefaultContext
cardinal, cardinal, currentDate, dateFormat, dateFormat, endsWith, find, find, findFirst, findFirst, findLast, findLast, getAvailableLocales, getAvailableTimeZones, getDateFormat, getDateFormatTimeZone, getLocale, getNullFormat, getNumberFormat, getNumberFormatInfinity, getNumberFormatNaN, nullFormat, numberFormat, numberFormat, ordinal, ordinal, print, print, print, print, print, print, replace, replace, replace, replaceFirst, replaceFirst, replaceLast, replaceLast, setLocale, setLocale, setLocale, shortOrdinal, shortOrdinal, startsWith, substring, substring, toLowerCase, toString, toString, toString, toString, toString, toString, toString, toString, toUpperCase, trim, trimLeading, trimTrailing
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BeanDocContext

public BeanDocContext(BeanDoc beandoc,
                      java.io.File dest)
               throws java.io.IOException
Creates a new BeanDocContext for use with a Tea template.
Parameters:
beandoc - the BeanDoc instance
dest - the "BeanInfo.java" file to write to.
Method Detail

print

public void print(java.lang.Object obj)
           throws java.io.IOException
The standard context method, implemented to write to the file.
Overrides:
print in class DefaultContext
Following copied from class: com.go.tea.runtime.DefaultContext
See Also:
Compiler.getRuntimeReceiver()

close

public void close()
           throws java.io.IOException
Closes the FileWriter

getMethodComment

public java.lang.String getMethodComment(ClassDoc classDoc,
                                         MethodDoc md)

getMethodParamComment

public java.lang.String getMethodParamComment(ClassDoc classDoc,
                                              MethodDoc md,
                                              java.lang.String paramName)

formatForLiteral

public java.lang.String formatForLiteral(java.lang.String s)
Returns a String that is same as the specified String except that all special/escape characters are formatted as if they are escaped.

So, for example a tab character ('\t') becomes the string "\\t"


printError

public void printError(java.lang.String msg)
Prints an error message. Can be used to print an error message from the Tea template.

printWarning

public void printWarning(java.lang.String msg)
Prints an warning message. Can be used to print an warning message from the Tea template.

printNotice

public void printNotice(java.lang.String msg)
Prints an notice message. Can be used to print an notice message from the Tea template.