Package org.fugerit.java.core.javagen
Class SimpleJavaGenerator
- java.lang.Object
-
- org.fugerit.java.core.javagen.BasicJavaGenerator
-
- org.fugerit.java.core.javagen.SimpleJavaGenerator
-
- All Implemented Interfaces:
JavaGenerator
public abstract class SimpleJavaGenerator extends BasicJavaGenerator
-
-
Field Summary
Fields Modifier and Type Field Description static String
CUSTOM_CODE_END
static String
CUSTOM_CODE_START
static String
CUSTOM_IMPORT_END
static String
CUSTOM_IMPORT_START
static String
PROP_AUTHOR
static String
PROP_CLASS_COMMENT
static String
PROP_VERSION
static String
STYLE_CLASS
static String
STYLE_INTERFACE
-
Fields inherited from class org.fugerit.java.core.javagen.BasicJavaGenerator
logger
-
-
Constructor Summary
Constructors Constructor Description SimpleJavaGenerator()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
addSerialVerUID()
protected void
beforeClass()
protected void
customPartWorker(String startTag, String endTag, String indent)
void
generate()
abstract void
generateBody()
protected Properties
getConfig()
protected String
getExtendsClass()
protected String
getImplementsInterface()
protected String
getJavaStyle()
void
init(File sourceFolder, String fullObjectBName, String javaStyle, Properties config)
void
init(File sourceFolder, String fullObjectBName, String javaStyle, Properties config, String lineSeparator)
boolean
isNoCustomComment()
protected void
setConfig(Properties config)
protected void
setExtendsClass(String extendsClass)
protected void
setImplementsInterface(String implementsInterface)
protected void
setJavaStyle(String javaStyle)
void
setNoCustomComment(boolean noCustomComment)
-
Methods inherited from class org.fugerit.java.core.javagen.BasicJavaGenerator
customPartWorker, customPartWorker, getContent, getImportList, getJavaFile, getJavaName, getPackageName, getWriter, init, init, println, println, printlnWithTabs, setJavaFile, write
-
-
-
-
Field Detail
-
PROP_VERSION
public static final String PROP_VERSION
- See Also:
- Constant Field Values
-
PROP_AUTHOR
public static final String PROP_AUTHOR
- See Also:
- Constant Field Values
-
PROP_CLASS_COMMENT
public static final String PROP_CLASS_COMMENT
- See Also:
- Constant Field Values
-
STYLE_CLASS
public static final String STYLE_CLASS
- See Also:
- Constant Field Values
-
STYLE_INTERFACE
public static final String STYLE_INTERFACE
- See Also:
- Constant Field Values
-
CUSTOM_CODE_START
public static final String CUSTOM_CODE_START
- See Also:
- Constant Field Values
-
CUSTOM_CODE_END
public static final String CUSTOM_CODE_END
- See Also:
- Constant Field Values
-
CUSTOM_IMPORT_START
public static final String CUSTOM_IMPORT_START
- See Also:
- Constant Field Values
-
CUSTOM_IMPORT_END
public static final String CUSTOM_IMPORT_END
- See Also:
- Constant Field Values
-
-
Method Detail
-
init
public void init(File sourceFolder, String fullObjectBName, String javaStyle, Properties config, String lineSeparator) throws ConfigException
- Throws:
ConfigException
-
init
public void init(File sourceFolder, String fullObjectBName, String javaStyle, Properties config) throws ConfigException
- Throws:
ConfigException
-
isNoCustomComment
public boolean isNoCustomComment()
-
setNoCustomComment
public void setNoCustomComment(boolean noCustomComment)
-
getConfig
protected Properties getConfig()
-
setConfig
protected void setConfig(Properties config)
-
getJavaStyle
protected String getJavaStyle()
-
setJavaStyle
protected void setJavaStyle(String javaStyle)
-
getExtendsClass
protected String getExtendsClass()
-
setExtendsClass
protected void setExtendsClass(String extendsClass)
-
getImplementsInterface
protected String getImplementsInterface()
-
setImplementsInterface
protected void setImplementsInterface(String implementsInterface)
-
beforeClass
protected void beforeClass()
-
generate
public void generate() throws IOException
- Specified by:
generate
in interfaceJavaGenerator
- Specified by:
generate
in classBasicJavaGenerator
- Throws:
IOException
-
generateBody
public abstract void generateBody() throws IOException
- Throws:
IOException
-
customPartWorker
protected void customPartWorker(String startTag, String endTag, String indent) throws FileNotFoundException, IOException
- Throws:
FileNotFoundException
IOException
-
addSerialVerUID
protected void addSerialVerUID() throws IOException
- Throws:
IOException
-
-