|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.enhydra.zeus.generator.SimpleGenerator
is the portion of Zeus that will convert
a set of constraints, visible through a Generator
,
and output them as generated Java classes (to a
Binding
File
[directory]).
SimpleGenerator
is the simplest form of a
Generator
and takes in either a single Binding
or a List
of them, and directly generates Java classes.
Field Summary | |
protected java.lang.String |
collectionClass
The Collection class to use |
Fields inherited from interface org.enhydra.zeus.Generator |
DEFAULT_COLLECTION_CLASS |
Constructor Summary | |
SimpleGenerator()
This will construct a new instance of SimpleGenerator . |
Method Summary | |
void |
generate(Binding binding,
java.io.File directory)
This will convert from a set of constraints to Java classes. |
java.lang.String |
getCollectionClass()
This will return the current class used for Collection
properties. |
void |
setCollectionClass(java.lang.String collectionClass)
This will set the Collection class to use anytime that
a collection of values need to be stored. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.lang.String collectionClass
Collection
class to useConstructor Detail |
public SimpleGenerator()
This will construct a new instance of SimpleGenerator
.
Method Detail |
public void setCollectionClass(java.lang.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
.
The class specified should be an implementation of the
Generator.DEFAULT_COLLECTION_CLASS
java.util.Collection
interface.
Note that the supplied class name must be fully qualified. For
example, java.util.List
would be fine, but
List
would not be.
setCollectionClass
in interface Generator
collectionClass
- String
name of collection to use.public java.lang.String getCollectionClass()
This will return the current class used for Collection
properties.
getCollectionClass
in interface Generator
String
- name of class used for Collection
s.public void generate(Binding binding, java.io.File directory) throws java.io.IOException
This will convert from a set of constraints to Java classes.
It accesses those constraints through the
interface, which provides
them in a representation-independent format, and then
converts them into Java code, which is output to the
supplied Binding
File
.
generate
in interface Generator
binder
- Binder
with ability to convert from
constraints to Zeus Binding
s.directory
- File
to output generated classes
to.IOException
- - when errors in writing to the
supplied Result
occur.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |