gov.nasa.arc.brahms.common.data.format.sourcecode
Class SourceCodeFormat

java.lang.Object
  extended by gov.nasa.arc.brahms.common.data.format.sourcecode.SourceCodeFormat
All Implemented Interfaces:
IFormat

public class SourceCodeFormat
extends java.lang.Object
implements IFormat

The SourceCodeFormat writes out BrahmsObjects as Brahms source code

Version:
$Revision: 1.3 $ $Date: 2009/04/03 19:18:00 $ $Author: rvhoof $
Author:
Ron van Hoof

Constructor Summary
SourceCodeFormat()
          Creates a new SourceCodeFormat
 
Method Summary
static IFormat getFormat()
          Returns an instance of the SourceCodeFormat
 IFormatter getFormatter(BrahmsObject obj)
          Returns the source code formatter for the given object.
 void init()
          Initialize the format linking the objects to the appropriate formatter
 void writeFormat(BrahmsObject obj, java.util.Properties p, java.io.DataOutputStream out)
          Writes the given object out in the format defined for that object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SourceCodeFormat

public SourceCodeFormat()
Creates a new SourceCodeFormat

Method Detail

getFormat

public static IFormat getFormat()
Returns an instance of the SourceCodeFormat

Returns:
IFormat a SourceCodeFormat

init

public void init()
Initialize the format linking the objects to the appropriate formatter


getFormatter

public IFormatter getFormatter(BrahmsObject obj)
Returns the source code formatter for the given object.

Specified by:
getFormatter in interface IFormat
Parameters:
obj - the BrahmsObject to be formatted
Returns:
IFormatter the object containing the formatting logic for the object

writeFormat

public void writeFormat(BrahmsObject obj,
                        java.util.Properties p,
                        java.io.DataOutputStream out)
Writes the given object out in the format defined for that object.

Specified by:
writeFormat in interface IFormat
Parameters:
obj - the BrahmsObject to be written out in this format
p - the Properties relevant for the formatting of the output
out - the DataOutputStream to write the format output to


Copyright © 1997-2012 All Rights Reserved.