Package org.nuiton.jaxx.compiler
Class DefaultCompilerConfiguration
- java.lang.Object
-
- org.nuiton.jaxx.compiler.DefaultCompilerConfiguration
-
- All Implemented Interfaces:
CompilerConfiguration
public class DefaultCompilerConfiguration extends Object implements CompilerConfiguration
Options of theJAXXCompilerandJAXXEngine.
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,CompiledObjectDecorator>decoratorsdecorators available in engineprotected String[]extraImportslist of fqn of class to import for all generated jaxx filesprotected Map<String,JAXXCompilerFinalizer>finalizersfinalizers available in engineprotected Map<String,Initializer>initializersinitializes availablesprotected Class<? extends JAXXContext>jaxxContextClassthe name of implementation ofJAXXContextto be used onJAXXObject.-
Fields inherited from interface org.nuiton.jaxx.compiler.CompilerConfiguration
DEFAULT_CSS_EXTENSION
-
-
Constructor Summary
Constructors Constructor Description DefaultCompilerConfiguration()
-
Method Summary
-
-
-
Field Detail
-
jaxxContextClass
protected Class<? extends JAXXContext> jaxxContextClass
the name of implementation ofJAXXContextto be used onJAXXObject.
-
extraImports
protected String[] extraImports
list of fqn of class to import for all generated jaxx files
-
decorators
protected Map<String,CompiledObjectDecorator> decorators
decorators available in engine
-
finalizers
protected Map<String,JAXXCompilerFinalizer> finalizers
finalizers available in engine
-
initializers
protected Map<String,Initializer> initializers
initializes availables
-
-
Method Detail
-
getTargetDirectory
public File getTargetDirectory()
Description copied from interface:CompilerConfigurationReturns the target directory.- Specified by:
getTargetDirectoryin interfaceCompilerConfiguration- Returns:
- the target directory
-
getOptimize
public boolean getOptimize()
Description copied from interface:CompilerConfigurationReturns whether or not optimization should be performed.- Specified by:
getOptimizein interfaceCompilerConfiguration- Returns:
- whether or not optimizations should be performed
-
isVerbose
public boolean isVerbose()
- Specified by:
isVerbosein interfaceCompilerConfiguration- Returns:
trueif compiler is verbose
-
isShowClassDescriptorLoading
public boolean isShowClassDescriptorLoading()
- Specified by:
isShowClassDescriptorLoadingin interfaceCompilerConfiguration- Returns:
trueto trace the Class descriptor loading.
-
isAddAutoHandlerUI
public boolean isAddAutoHandlerUI()
- Specified by:
isAddAutoHandlerUIin interfaceCompilerConfiguration- Returns:
trueto detect and addUIHandlerif found in class-path.
-
setAddAutoHandlerUI
public void setAddAutoHandlerUI(boolean addAutoHandlerUI)
- Specified by:
setAddAutoHandlerUIin interfaceCompilerConfiguration- Parameters:
addAutoHandlerUI- new value of the state
-
isGenerateMissingIdsAndStyleClassesInCss
public boolean isGenerateMissingIdsAndStyleClassesInCss()
- Specified by:
isGenerateMissingIdsAndStyleClassesInCssin interfaceCompilerConfiguration- Returns:
trueto generate missing ids and style classes in the CSS files
-
setGenerateMissingIdsAndStyleClassesInCss
public void setGenerateMissingIdsAndStyleClassesInCss(boolean generateMissingIdsAndStyleClassesInCss)
- Specified by:
setGenerateMissingIdsAndStyleClassesInCssin interfaceCompilerConfiguration- Parameters:
generateMissingIdsAndStyleClassesInCss- new value of the state
-
setVerbose
public void setVerbose(boolean verbose)
-
isI18nable
public boolean isI18nable()
- Specified by:
isI18nablein interfaceCompilerConfiguration- Returns:
trueif we use the i18n system
-
isUseUIManagerForIcon
public boolean isUseUIManagerForIcon()
- Specified by:
isUseUIManagerForIconin interfaceCompilerConfiguration- Returns:
trueif UIManager is used to retrieve icons
-
isAddLogger
public boolean isAddLogger()
- Specified by:
isAddLoggerin interfaceCompilerConfiguration- Returns:
trueif a logger must add on each generated jaxx object
-
getJaxxContextClass
public Class<? extends JAXXContext> getJaxxContextClass()
- Specified by:
getJaxxContextClassin interfaceCompilerConfiguration- Returns:
- the type of context to use in each generated jaxx object
-
getExtraImports
public String[] getExtraImports()
- Specified by:
getExtraImportsin interfaceCompilerConfiguration- Returns:
- extra imports to add on all generated jaxx object
-
isResetAfterCompile
public boolean isResetAfterCompile()
- Specified by:
isResetAfterCompilein interfaceCompilerConfiguration- Returns:
trueif states must be reset after the compilation
-
isOptimize
public boolean isOptimize()
- Specified by:
isOptimizein interfaceCompilerConfiguration- Returns:
trueto generate optimized code
-
getDefaultErrorUI
public Class<?> getDefaultErrorUI()
- Specified by:
getDefaultErrorUIin interfaceCompilerConfiguration- Returns:
- the type of the default error UI to use for validation
-
getClassLoader
public ClassLoader getClassLoader()
- Specified by:
getClassLoaderin interfaceCompilerConfiguration- Returns:
- the class loader used by compilers
-
getCompilerClass
public Class<? extends JAXXCompiler> getCompilerClass()
- Specified by:
getCompilerClassin interfaceCompilerConfiguration- Returns:
- the type of compiler to use
-
getDefaultDecoratorClass
public Class<? extends CompiledObjectDecorator> getDefaultDecoratorClass()
- Specified by:
getDefaultDecoratorClassin interfaceCompilerConfiguration- Returns:
- the type of default decorator to use if none specified
-
isProfile
public boolean isProfile()
- Specified by:
isProfilein interfaceCompilerConfiguration- Returns:
trueif a profile pass must be done
-
getValidatorFactoryFQN
public String getValidatorFactoryFQN()
- Specified by:
getValidatorFactoryFQNin interfaceCompilerConfiguration- Returns:
- the FQN of the validator factory used to instanciate new validators.
-
getEncoding
public String getEncoding()
- Specified by:
getEncodingin interfaceCompilerConfiguration- Returns:
- the encoding to use to write files
-
getDecorators
public Map<String,CompiledObjectDecorator> getDecorators()
- Specified by:
getDecoratorsin interfaceCompilerConfiguration
-
getFinalizers
public Map<String,JAXXCompilerFinalizer> getFinalizers()
- Specified by:
getFinalizersin interfaceCompilerConfiguration
-
getInitializers
public Map<String,Initializer> getInitializers()
- Specified by:
getInitializersin interfaceCompilerConfiguration
-
getCommonCss
public URL getCommonCss()
- Specified by:
getCommonCssin interfaceCompilerConfiguration- Returns:
- the optional common css to inject in all JaxxCompiler.
-
getCssExtension
public String getCssExtension()
- Specified by:
getCssExtensionin interfaceCompilerConfiguration- Returns:
- the extension of css files (by default use
CompilerConfiguration.DEFAULT_CSS_EXTENSIONas before).
-
getI18nModule
public io.ultreia.java4all.i18n.spi.builder.I18nModule getI18nModule()
- Specified by:
getI18nModulein interfaceCompilerConfiguration
-
setI18nModule
public void setI18nModule(io.ultreia.java4all.i18n.spi.builder.I18nModule i18nModule)
- Specified by:
setI18nModulein interfaceCompilerConfiguration
-
setCommonCss
public void setCommonCss(URL commonCss)
-
isAutoRecurseInCss
public boolean isAutoRecurseInCss()
Description copied from interface:CompilerConfigurationReturns whether or not should recurse in css for existing JAXX Object. Note: This functionnality was here at the beginning of the project but offers nothing very usefull, will be remove probably in JAXX 3.0.- Specified by:
isAutoRecurseInCssin interfaceCompilerConfiguration- Returns:
trueif a css file with same name as jaxx file should be included in jaxx file if found.
-
isDetectAction
public boolean isDetectAction()
- Specified by:
isDetectActionin interfaceCompilerConfiguration- Returns:
trueto detect actions from convetion and link them to buttons.
-
setDetectAction
public void setDetectAction(boolean detectAction)
- Specified by:
setDetectActionin interfaceCompilerConfiguration- Parameters:
detectAction- new value of the state
-
isGenerateI18nHelper
public boolean isGenerateI18nHelper()
- Specified by:
isGenerateI18nHelperin interfaceCompilerConfiguration
-
setGenerateI18nHelper
public void setGenerateI18nHelper(boolean generateI18nHelper)
- Specified by:
setGenerateI18nHelperin interfaceCompilerConfiguration
-
isApplyI18nHelper
public boolean isApplyI18nHelper()
- Specified by:
isApplyI18nHelperin interfaceCompilerConfiguration
-
setApplyI18nHelper
public void setApplyI18nHelper(boolean applyI18nHelper)
- Specified by:
setApplyI18nHelperin interfaceCompilerConfiguration
-
-