|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Generator
is the portion of Zeus that will convert
a set of constraints, visible through a
,
and output them as generated Java classes (to a
Binding
.
Result
Field Summary | |
static java.lang.String |
DEFAULT_COLLECTION_CLASS
The default Collection class |
Method Summary | |
void |
generate(Binding binding)
This will convert from a set of constraints to Java classes. |
boolean |
generateAsSerializable()
This will return true if the generator is set to
generate Serializable classes, or else
false . |
java.lang.String |
getCollectionClass()
This will return the current class used for Collection
properties. |
java.lang.String |
getImplementationPackage()
Returns the Java package to generate implementation classes within. |
java.lang.String |
getInterfacePackage()
Returns the Java package to generate interfaces within. |
void |
setCollectionClass(java.lang.String collectionClass)
This will set the Collection class to use anytime that
a collection of values need to be stored. |
void |
setGenerateAsSerializable(boolean generateAsSerializable)
This will allow for setting the generator to generate serializable classes. |
void |
setIgnoreBinding(java.lang.String bindingName)
This allows a binding to be ignored. |
void |
setImplementationPackage(java.lang.String implPackage)
Sets the Java package to generate new interfaces within. |
void |
setInterfacePackage(java.lang.String interfacePackage)
Sets the Java package to generate new interfaces within. |
void |
setJavaPackage(java.lang.String interfacePackage)
Sets the Java package to generate new interfaces and implementation within. |
void |
setOutputDirectory(java.io.File outputDir)
This sets the output directory to output generated classes to. |
void |
setOutputDirectory(java.lang.String outputDir)
This sets the output directory to output generated classes to. |
Field Detail |
public static final java.lang.String DEFAULT_COLLECTION_CLASS
Collection
classMethod 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
DEFAULT_COLLECTION_CLASS
java.util.Collection
interface.
collectionClass
- String
name of collection to use.public java.lang.String getCollectionClass()
This will return the current class used for Collection
properties.
String
- name of class used for Collection
s.public void setJavaPackage(java.lang.String interfacePackage)
Sets the Java package to generate new interfaces and implementation within. For example, supplying the value com.foo.bar to this method and then generating classes, the classes would all be in the com.foo.bar package after generation.
javaPackage
- String
the Java package to
generate interfaces and implementation classes within.public java.lang.String getInterfacePackage()
Returns the Java package to generate interfaces within.
String
- the Java package to unmarshall
interfaces to.public void setInterfacePackage(java.lang.String interfacePackage)
Sets the Java package to generate new interfaces within. For example, supplying the value com.foo.bar to this method and then generating classes, the interfaces would all be in the com.foo.bar package after generation.
interfacePackage
- String
the Java package to
generate interfaces within.public java.lang.String getImplementationPackage()
Returns the Java package to generate implementation classes within.
String
- the Java package to generate
implementation classes within.public void setImplementationPackage(java.lang.String implPackage)
Sets the Java package to generate new interfaces within. For example, supplying the value com.foo.bar to this method and then generating classes, the interfafces would all be in the com.foo.bar package after generation.
implPackage
- String
the Java package to
generate interfaces within.public void setOutputDirectory(java.lang.String outputDir)
This sets the output directory to output generated classes to.
outputDir
- the name of the base directory where
all generated classes should be placedpublic void setOutputDirectory(java.io.File outputDir)
This sets the output directory to output generated classes to.
outputDir
- the File
(directory) where
all generated classes should be placedpublic boolean generateAsSerializable()
This will return true
if the generator is set to
generate Serializable
classes, or else
false
.
boolean
- whether classes will be serializable.public void setGenerateAsSerializable(boolean generateAsSerializable)
This will allow for setting the generator to generate serializable classes. By default, classes are not set to be serializable.
generateAsSerializable
- whether or not to generate serializable
classespublic void setIgnoreBinding(java.lang.String bindingName)
This allows a binding to be ignored. This is an intermediary step towards allowing binding schemas. The name of the binding should be passed in here, and no property generation for it will occur.
bindingName
- the name of the binding to ignore.public void generate(Binding binding) 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.
Binding
binder
- Binder
with ability to convert from
constraints to Zeus Binding
s.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 |