com.mcdermottroe.exemplar.output.java.sax1
Class Generator

java.lang.Object
  extended by com.mcdermottroe.exemplar.output.XMLParserGenerator<T>
      extended by com.mcdermottroe.exemplar.output.XMLParserSourceGenerator<T>
          extended by com.mcdermottroe.exemplar.output.java.XMLJavaSourceGenerator<Generator>
              extended by com.mcdermottroe.exemplar.output.java.sax1.Generator
All Implemented Interfaces:
Copyable<Generator>, Comparable<Generator>

public class Generator
extends XMLJavaSourceGenerator<Generator>

A class which generates Java parsers that implement the SAX 1 XML parser API.

Since:
0.1

Field Summary
 
Fields inherited from class com.mcdermottroe.exemplar.output.XMLParserSourceGenerator
codeFragments, timestamp
 
Constructor Summary
  Generator()
          Creates a source generator which produces parsers in the Java language which implement the SAX version 1 API.
protected Generator(Map<String,String> code, String time)
          Copy constructor, see XMLParserSourceGenerator(Map, String) for details.
 
Method Summary
 String describeAPI()
          Describe the API that the generated code implements/conforms to.
 Generator getCopy()
          Creates a deep copy of the current object and returns it.
 
Methods inherited from class com.mcdermottroe.exemplar.output.java.XMLJavaSourceGenerator
describeLanguage, generateParser
 
Methods inherited from class com.mcdermottroe.exemplar.output.XMLParserSourceGenerator
compareTo, create, getCodeFragments, getSourceDirectory, getTimestamp, loadCodeFragment
 
Methods inherited from class com.mcdermottroe.exemplar.output.XMLParserGenerator
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Generator

public Generator()
          throws XMLParserGeneratorException
Creates a source generator which produces parsers in the Java language which implement the SAX version 1 API.

Throws:
XMLParserGeneratorException - if the super-class constructor throws one.

Generator

protected Generator(Map<String,String> code,
                    String time)
Copy constructor, see XMLParserSourceGenerator(Map, String) for details.

Parameters:
code - The code fragments.
time - The timestamp.
Method Detail

describeAPI

public String describeAPI()
Describe the API that the generated code implements/conforms to.

Specified by:
describeAPI in class XMLParserGenerator<Generator>
Returns:
A String that can be used in help messages and in documentation to describe the API that the generated code implements.

getCopy

public Generator getCopy()
                  throws CopyException
Creates a deep copy of the current object and returns it.

Returns:
A deep copy of the current object.
Throws:
CopyException - if the copying encountered an exception.