|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.enhydra.zeus.transform.TransformerOptions
TransformerOptions
is used to specify options used in
and related classes
and processes. It specifies global options for transformation such
as packages, collection types, and more.
Transformer
Field Summary | |
protected int |
defaultCollectionType
The default collection class type |
protected java.lang.String |
defaultPackage
The default package for all classes, unless overridden |
protected java.lang.String |
implementationPackage
The default implementation package for this transformation |
protected java.lang.String |
interfacePackage
The default interface package for this transformation |
Constructor Summary | |
TransformerOptions()
This default constructor sets up default variable values. |
|
TransformerOptions(java.lang.String defaultPackage,
int defaultCollectionType)
This convenience constructor allows options to be set on construction. |
|
TransformerOptions(java.lang.String interfacePackage,
java.lang.String implementationPackage,
int defaultCollectionType)
This convenience constructor allows options to be set on construction. |
Method Summary | |
java.lang.String |
getDefaultCollectionType()
This will return the default collection class name for this set of transformation options. |
java.lang.String |
getImplementationPackage()
This returns the default package in which generated implementations are placed. |
java.lang.String |
getInterfacePackage()
This returns the default package in which generated interfaces are placed. |
void |
setDefaultCollectionType(int defaultCollectionType)
This allows setting of the default collection type for transformations, through constants defined in this class. |
void |
setDefaultCollectionType(java.lang.String defaultCollectionTypeString)
This allows setting of the default collection type for transformations, through supplying a String class name, such as
java.util.List . |
void |
setDefaultPackage(java.lang.String defaultPackage)
This sets the default and global package for all generated classes, unless a specific package for interfaces and/or implementations is supplied, which then overrides this setting. |
void |
setImplementationPackage(java.lang.String implementationPackage)
This sets the default and global interface package for generated classes. |
void |
setInterfacePackage(java.lang.String interfacePackage)
This sets the default and global interface package for generated classes. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.lang.String defaultPackage
protected java.lang.String interfacePackage
protected java.lang.String implementationPackage
protected int defaultCollectionType
Constructor Detail |
public TransformerOptions()
This default constructor sets up default variable values.
public TransformerOptions(java.lang.String defaultPackage, int defaultCollectionType)
This convenience constructor allows options to be set on construction.
defaultPackage
- the package for all generated classes.defaultCollectionType
- constant for the collection type to use.public TransformerOptions(java.lang.String interfacePackage, java.lang.String implementationPackage, int defaultCollectionType)
This convenience constructor allows options to be set on construction.
interfacePackage
- the package for all generated interfaces.implementationPackage
- the package for all generated implementation
packages.defaultCollectionType
- constant for the collection type to use.Method Detail |
public void setDefaultPackage(java.lang.String defaultPackage)
This sets the default and global package for all generated
classes, unless a specific package for interfaces and/or
implementations is supplied, which then overrides this
setting. Those packages can be set using the
and
setInterfacePackage(java.lang.String)
methods.
setImplementationPackage(java.lang.String)
There is intentionally not a getDefaultPackage()
method.
Instead,
and
getInterfacePackage()
should be used,
which return correct values based on the default and specific
packages set for both options.getImplementationPackage()
interfacePackage
- the package for generated interfaces.public void setInterfacePackage(java.lang.String interfacePackage)
This sets the default and global interface package for generated classes.
interfacePackage
- the package for generated interfaces.public java.lang.String getInterfacePackage()
This returns the default package in which generated interfaces are placed.
String
- the default interface package.public void setImplementationPackage(java.lang.String implementationPackage)
This sets the default and global interface package for generated classes.
interfacePackage
- the package for generated interfaces.public java.lang.String getImplementationPackage()
This returns the default package in which generated implementations are placed.
String
- the default implementation package.public void setDefaultCollectionType(int defaultCollectionType) throws InvalidCollectionTypeException
This allows setting of the default collection type for transformations,
through constants defined in this class. If the supplied constant is
an illegal type, an
is thrown.
InvalidCollectionTypeException
defaultCollectionType
- the collection type to use in
transformations, as an int
constant.InvalidCollectionTypeException
- - when an illegal
collection type is supplied.{@link #COLLECTION_TYPE_LIST}
,
{@link #COLLECTION_TYPE_ARRAY}
public void setDefaultCollectionType(java.lang.String defaultCollectionTypeString) throws InvalidCollectionTypeException
This allows setting of the default collection type for transformations,
through supplying a String
class name, such as
java.util.List
. If the supplied type is an illegal type,
an
is thrown.
InvalidCollectionTypeException
defaultCollectionTypeString
- the String representation of the
collection type to use.InvalidCollectionTypeException
- - when an illegal
collection type is supplied.public java.lang.String getDefaultCollectionType()
This will return the default collection class name for this set
of transformation options. This will return a fully-qualified class
name, such as java.util.List
.
String
- the class name for the collection type.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |