org.enhydra.zeus
Interface Generator

All Known Implementing Classes:
SimpleGenerator

public interface Generator

Generator is the portion of Zeus that will convert a set of constraints, visible through a Binding, and output them as generated Java classes (to a Result.

Author:
Brett McLaughlin
Version: 1.0

Field Summary
 final static StringDEFAULT_COLLECTION_CLASS
          The default Collection class

Method Summary
 voidgenerate(Binding binding, File directory)
           This will convert from a set of constraints to Java classes.
 StringgetCollectionClass()
           This will return the current class used for Collection properties.
 voidsetCollectionClass(String collectionClass)
           This will set the Collection class to use anytime that a collection of values need to be stored.

Field Detail

DEFAULT_COLLECTION_CLASS

public final static String DEFAULT_COLLECTION_CLASS
The default Collection class
Method Detail

generate

public void generate(Binding binding, File directory)
throws java.io.IOException

This will convert from a set of constraints to Java classes. It accesses those constraints through the Binding interface, which provides them in a representation-independent format, and then converts them into Java code, which is output to the supplied Result.

Parameters:
binder - Binder with ability to convert from constraints to Zeus Bindings.
directory - File to output generated classes to.
Throws:
IOException - - when errors in writing to the supplied Result occur.

getCollectionClass

public String getCollectionClass()

This will return the current class used for Collection properties.

Returns: String - name of class used for Collections.

setCollectionClass

public void setCollectionClass(String collectionClass)

This will set the Collection class to use anytime that a collection of values need to be stored. The default value for this class is stored in DEFAULT_COLLECTION_CLASS. The class specified should be an implementation of the java.util.Collection interface.

Parameters:
collectionClass - String name of collection to use.

Association Links

to Class java.lang.String

The default Collection class