Package org.nuiton.eugene
Class DefaultTemplateConfiguration
- java.lang.Object
-
- org.nuiton.eugene.DefaultTemplateConfiguration
-
- All Implemented Interfaces:
TemplateConfiguration
public class DefaultTemplateConfiguration extends Object implements TemplateConfiguration
Default template configuration- Since:
- 2.0.2
- Author:
- Tony Chemit - chemit@codelutin.com
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_ENCONDING
protected Properties
properties
-
Fields inherited from interface org.nuiton.eugene.TemplateConfiguration
PROP_CLASS_LOADER, PROP_DEFAULT_PACKAGE, PROP_ENCODING, PROP_EXCLUDE_TEMPLATES, PROP_GENERATED_PACKAGES, PROP_LAST_MODIFIED_SOURCE, PROP_OVERWRITE, PROP_VERBOSE, PROP_WRITER_REPORT
-
-
Constructor Summary
Constructors Constructor Description DefaultTemplateConfiguration()
DefaultTemplateConfiguration(Properties properties)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ClassLoader
getClassLoader()
String
getEncoding()
long
getLastModifiedSource()
Properties
getProperties()
String
getProperty(String key)
<V> V
getProperty(String key, Class<V> type)
WriterReport
getWriterReport()
boolean
isOverwrite()
boolean
isVerbose()
void
setEncoding(String encoding)
void
setLastModifiedSource(long lastModifiedSource)
void
setLoader(ClassLoader loader)
void
setOverwrite(boolean overwrite)
void
setProperties(Properties properties)
void
setProperty(String key, Object value)
void
setVerbose(boolean verbose)
-
-
-
Field Detail
-
DEFAULT_ENCONDING
public static final String DEFAULT_ENCONDING
- See Also:
- Constant Field Values
-
properties
protected Properties properties
-
-
Constructor Detail
-
DefaultTemplateConfiguration
public DefaultTemplateConfiguration()
-
DefaultTemplateConfiguration
public DefaultTemplateConfiguration(Properties properties)
-
-
Method Detail
-
isOverwrite
public boolean isOverwrite()
- Specified by:
isOverwrite
in interfaceTemplateConfiguration
- Returns:
true
if must regenerate files even if they are up to date
-
isVerbose
public boolean isVerbose()
- Specified by:
isVerbose
in interfaceTemplateConfiguration
- Returns:
true
if build is verbose.
-
getEncoding
public String getEncoding()
- Specified by:
getEncoding
in interfaceTemplateConfiguration
- Returns:
- encoding to use to read and write files
-
getClassLoader
public ClassLoader getClassLoader()
- Specified by:
getClassLoader
in interfaceTemplateConfiguration
- Returns:
- the classloader to use to seek for resources
-
getWriterReport
public WriterReport getWriterReport()
- Specified by:
getWriterReport
in interfaceTemplateConfiguration
-
getLastModifiedSource
public long getLastModifiedSource()
- Specified by:
getLastModifiedSource
in interfaceTemplateConfiguration
-
getProperties
public Properties getProperties()
- Specified by:
getProperties
in interfaceTemplateConfiguration
-
getProperty
public String getProperty(String key)
- Specified by:
getProperty
in interfaceTemplateConfiguration
-
getProperty
public <V> V getProperty(String key, Class<V> type)
- Specified by:
getProperty
in interfaceTemplateConfiguration
-
setProperty
public void setProperty(String key, Object value)
- Specified by:
setProperty
in interfaceTemplateConfiguration
-
setOverwrite
public void setOverwrite(boolean overwrite)
-
setVerbose
public void setVerbose(boolean verbose)
-
setEncoding
public void setEncoding(String encoding)
-
setLoader
public void setLoader(ClassLoader loader)
-
setLastModifiedSource
public void setLastModifiedSource(long lastModifiedSource)
-
setProperties
public void setProperties(Properties properties)
-
-