public final class SingleClassGenerator extends Object
| Constructor and Description |
|---|
SingleClassGenerator(ConsoleDialog dialog,
SourceGenerator sourceGenerator,
String conflictStrategyType,
String jClassPrinterType)
Creates an instance of this class.
|
| Modifier and Type | Method and Description |
|---|---|
SourceGenerator |
getSourceGenerator()
Returns the
SourceGenerator instance that created this class. |
void |
setDescriptorCreation(boolean createDescriptors)
Sets whether or not to create ClassDescriptors for the generated classes.
|
void |
setDestDir(String destDir)
Sets the destination directory.
|
void |
setJClassPrinterType(String jclassPrinterType)
Sets the type of the
JClassPrinter instance to be used for JClass writing. |
void |
setJdoDescriptorCreation(boolean createJdoDescriptors)
Sets whether or not to create JDOClassDescriptors for the generated classes.
|
void |
setLineSeparator(String lineSeparator)
Sets the line separator to use when printing the source code.
|
void |
setNameConflictStrategy(String nameConflictStrategy)
Sets the desired
ClassNameCRStrategy instance type to be used for name conflict
resolution. |
void |
setPromptForOverwrite(boolean promptForOverwrite)
Sets whether or not to prompt when we would otherwise overwrite an existing JClass.
|
void |
setResourceDestinationDirectory(String destinationDirectory)
Sets the destination directory for generated resources.
|
public SingleClassGenerator(ConsoleDialog dialog, SourceGenerator sourceGenerator, String conflictStrategyType, String jClassPrinterType)
dialog - A ConsoleDialog instancesourceGenerator - A SourceGenerator instanceconflictStrategyType - Type of the ClassNameCRStrategy instance to be used.jClassPrinterType - The string representation of the printer to be used,public void setJClassPrinterType(String jclassPrinterType)
JClassPrinter instance to be used for JClass writing.jclassPrinterType - The string identifier if the printer,public void setDestDir(String destDir)
destDir - the destination directory.public void setResourceDestinationDirectory(String destinationDirectory)
destDir - the destination directory.public void setLineSeparator(String lineSeparator)
lineSeparator - the line separator to use when printing the source code. This method is
useful if you are generating source on one platform, but will be compiling the source on
a different platform. Note:This can be any string, so be careful. I recommend
either using the default or using one of the following:
windows systems use: "\r\n"
unix systems use: "\n"
mac systems use: "\r"
public void setDescriptorCreation(boolean createDescriptors)
createDescriptors - a boolean, when true indicates to generated ClassDescriptorspublic void setJdoDescriptorCreation(boolean createJdoDescriptors)
createJdoDescriptors - if true, JDOClassDescriptors are generated.public void setPromptForOverwrite(boolean promptForOverwrite)
promptForOverwrite - the new valuepublic void setNameConflictStrategy(String nameConflictStrategy)
ClassNameCRStrategy instance type to be used for name conflict
resolution.nameConflictStrategy - the desired ClassNameCRStrategy instance typepublic SourceGenerator getSourceGenerator()
SourceGenerator instance that created this class.SourceGenerator instance that created this class.Copyright © 2016. All rights reserved.