au.gov.tas.dpiwe.mr.tool
Class SerializableMaker

java.lang.Object
  extended by au.gov.tas.dpiwe.mr.tool.SerializableMaker

public class SerializableMaker
extends Object

This tool creates SerializableObject source files.

Since:
Mr Architecture 1.5
Version:
1.0.0.0
Author:
Kade Hansson

Constructor Summary
SerializableMaker()
           
 
Method Summary
static void generateSerializableClassSource(PrintWriter output, Class type, String makeRep, String makeSer)
          Generate the serializable object source code for a particular type.
static void main(String[] argv)
          Initiates the SerializableMaker tool.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SerializableMaker

public SerializableMaker()
Method Detail

main

public static void main(String[] argv)
                 throws Exception
Initiates the SerializableMaker tool.

Parameters:
argv - arguments are the qualified class name of class to make SerializableObject instant wrapper class for, an expression which constructs a suitable object for writing to the ObjectOutputStream in place of that class and another expression which decodes that representation into a SerializableObject instance.
Throws:
IOException - if the input file could not be read or the output file could not be written.
Exception - if something else goes wrong.

generateSerializableClassSource

public static void generateSerializableClassSource(PrintWriter output,
                                                   Class type,
                                                   String makeRep,
                                                   String makeSer)
                                            throws IOException
Generate the serializable object source code for a particular type.

Parameters:
output - the PrintWriter to which the source code should be written.
type - the "superclass" for this serializable object.
makeRep - an expression which constructs a suitable object for writing to the ObjectOutputStream in place of the "superclass"
makeSer - an expression which decodes the representation into a SerializableObject instance.
Throws:
IOException - if the input file could not be read or the output file could not be written.