edu.byu.ece.edif.util.jsap.commandgroups
Class OutputFileCommandGroup

java.lang.Object
  extended by edu.byu.ece.edif.util.jsap.commandgroups.AbstractCommandGroup
      extended by edu.byu.ece.edif.util.jsap.commandgroups.OutputFileCommandGroup
All Implemented Interfaces:
CommandGroup
Direct Known Subclasses:
JEdifOutputCommandGroup

public class OutputFileCommandGroup
extends AbstractCommandGroup

This class is used represent the command line options for specifying an output file.

Author:
Derrick Gibelyou TODO

Field Summary
protected  com.martiansoftware.jsap.FlaggedOption _output_file
           
static java.lang.String OUTPUT_OPTION
           
static char OUTPUT_OPTION_SHORT
           
 
Fields inherited from class edu.byu.ece.edif.util.jsap.commandgroups.AbstractCommandGroup
_options
 
Constructor Summary
OutputFileCommandGroup()
           
 
Method Summary
static java.lang.String getOutputFileName(com.martiansoftware.jsap.JSAPResult result)
           
static java.io.PrintStream getOutputStream(com.martiansoftware.jsap.JSAPResult result)
           
static void serializeObject(java.io.PrintStream out, java.lang.String filename, java.lang.Object obj)
          Serializes an object
static void serializeObjects(java.io.PrintStream out, java.lang.String filename, java.util.Collection objects)
          This method takes a Collection of objects to be serialized.
 void setDefaultFilename(java.lang.String filename)
           
 
Methods inherited from class edu.byu.ece.edif.util.jsap.commandgroups.AbstractCommandGroup
addCommand, getCommands
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_output_file

protected com.martiansoftware.jsap.FlaggedOption _output_file

OUTPUT_OPTION

public static final java.lang.String OUTPUT_OPTION
See Also:
Constant Field Values

OUTPUT_OPTION_SHORT

public static final char OUTPUT_OPTION_SHORT
See Also:
Constant Field Values
Constructor Detail

OutputFileCommandGroup

public OutputFileCommandGroup()
Method Detail

setDefaultFilename

public void setDefaultFilename(java.lang.String filename)

getOutputFileName

public static java.lang.String getOutputFileName(com.martiansoftware.jsap.JSAPResult result)

getOutputStream

public static java.io.PrintStream getOutputStream(com.martiansoftware.jsap.JSAPResult result)

serializeObject

public static void serializeObject(java.io.PrintStream out,
                                   java.lang.String filename,
                                   java.lang.Object obj)
Serializes an object

Parameters:
out: - PrintStream for errors/info
result: - JSAP commandline results
obj: - Object to serialize

serializeObjects

public static void serializeObjects(java.io.PrintStream out,
                                    java.lang.String filename,
                                    java.util.Collection objects)
This method takes a Collection of objects to be serialized. The intended use is to be able to serialize an EdifEnvironment optionally followed by a PreservedHierarchyByNames object.

Parameters:
out -
filename -
objects -