org.sandev.generator
Class MessageDecorator

java.lang.Object
  extended by org.sandev.generator.MessageDecorator

public class MessageDecorator
extends java.lang.Object

A generator hook class that provides for adding custom methods to specific generated message classes.


Constructor Summary
MessageDecorator()
           
 
Method Summary
protected  void writeAggregateUpdateMethods(java.io.PrintStream out, com.sun.javadoc.ClassDoc cd, com.sun.javadoc.FieldDoc[] fields)
          Write the decorator methods for an AggregateUpdate message
protected  void writeAuthUserEmailMethods(java.io.PrintStream out)
          Write a getUsername method to fulfill the AuthUser interface requirements using the email field.
 void writeDecoratorMethods(java.io.PrintStream out, com.sun.javadoc.ClassDoc cd, java.lang.String msgname, com.sun.javadoc.FieldDoc[] fields)
          Given the class and fields, write any additional methods needed into the given message stream.
 void writeImplements(java.io.PrintStream out, com.sun.javadoc.ClassDoc cd, java.lang.String msgname, com.sun.javadoc.FieldDoc[] fields)
          Given the class and fields, write any additional interfaces that are implemented in the resulting message.
 void writeImports(java.io.PrintStream out, com.sun.javadoc.ClassDoc cd, java.lang.String msgname, com.sun.javadoc.FieldDoc[] fields)
          Given the class and fields, write any additional imports needed by any of the decorator methods being written.
protected  void writeListImports(java.io.PrintStream out)
          Write the imports needed for standard List processing.
protected  void writeStandardMessageDecorators(java.io.PrintStream out, java.lang.String msgname)
          Write the standard message decorator methods.
protected  void writeToStringMethod(java.io.PrintStream out, java.lang.String msgname)
          Write the standard toString method for this class
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageDecorator

public MessageDecorator()
Method Detail

writeImports

public void writeImports(java.io.PrintStream out,
                         com.sun.javadoc.ClassDoc cd,
                         java.lang.String msgname,
                         com.sun.javadoc.FieldDoc[] fields)
                  throws org.sandev.sandbuild.SandGeneratorException
Given the class and fields, write any additional imports needed by any of the decorator methods being written.

Throws:
org.sandev.sandbuild.SandGeneratorException

writeImplements

public void writeImplements(java.io.PrintStream out,
                            com.sun.javadoc.ClassDoc cd,
                            java.lang.String msgname,
                            com.sun.javadoc.FieldDoc[] fields)
                     throws org.sandev.sandbuild.SandGeneratorException
Given the class and fields, write any additional interfaces that are implemented in the resulting message.

Throws:
org.sandev.sandbuild.SandGeneratorException

writeDecoratorMethods

public void writeDecoratorMethods(java.io.PrintStream out,
                                  com.sun.javadoc.ClassDoc cd,
                                  java.lang.String msgname,
                                  com.sun.javadoc.FieldDoc[] fields)
                           throws org.sandev.sandbuild.SandGeneratorException
Given the class and fields, write any additional methods needed into the given message stream.

Throws:
org.sandev.sandbuild.SandGeneratorException

writeListImports

protected void writeListImports(java.io.PrintStream out)
Write the imports needed for standard List processing.


writeStandardMessageDecorators

protected void writeStandardMessageDecorators(java.io.PrintStream out,
                                              java.lang.String msgname)
Write the standard message decorator methods.


writeToStringMethod

protected void writeToStringMethod(java.io.PrintStream out,
                                   java.lang.String msgname)
Write the standard toString method for this class


writeAggregateUpdateMethods

protected void writeAggregateUpdateMethods(java.io.PrintStream out,
                                           com.sun.javadoc.ClassDoc cd,
                                           com.sun.javadoc.FieldDoc[] fields)
                                    throws org.sandev.sandbuild.SandGeneratorException
Write the decorator methods for an AggregateUpdate message

Throws:
org.sandev.sandbuild.SandGeneratorException

writeAuthUserEmailMethods

protected void writeAuthUserEmailMethods(java.io.PrintStream out)
Write a getUsername method to fulfill the AuthUser interface requirements using the email field. We assume that the class has an email field and does not have a username field.