@Mojo(name="generate",
defaultPhase=PROCESS_SOURCES,
requiresDependencyResolution=COMPILE,
requiresProject=true)
public class GenerateMojo
extends AbstractJaxxMojo
implements jaxx.compiler.CompilerConfiguration
AbstractJaxxMojo.JaxxFileUpdater| Modifier and Type | Field and Description |
|---|---|
protected boolean |
addCompileClassPath
Flag to include in compiler classpath the compile class-path (can only be
used in a test phase).
|
protected boolean |
addLogger
Flag to add logger to each generated jaxx file.
|
protected boolean |
addProjectClassPath
Flag to include in compiler classpath the project compile classpath.
|
protected boolean |
addResourcesToClassPath
Flag to include in compiler classpath the java resources directories (src
and outJava).
|
protected boolean |
addSourcesToClassPath
Flag to include in compiler classpath the java sources directories (src
and outJava).
|
protected boolean |
autoImportCss
To auto import css files for a jaxx file.
|
protected boolean |
autoRecurseInCss
To let jaxx recurses in css when a JAXX Object auto import css files
for a jaxx file.
|
protected String[] |
beanInfoSearchPath
Extra path to be added in
Introspector.setBeanInfoSearchPath(String[]). |
protected ClassLoader |
cl
customized classloader to use in engine
|
protected String |
compilerFQN
FQN of compiler to use (by default swing one).
|
protected Map<String,jaxx.compiler.CompiledObjectDecorator> |
decorators
Decorators available in engine.
|
protected String |
defaultDecoratorFQN
The FQN of the ui to use for error notification.
|
protected String |
defaultErrorUIFQN
The FQN of the ui to use for error notification.
|
protected String[] |
excludes
To filter files to NOt treat.
|
protected String |
extraImportList
List of fqn of class toimport for all generated jaxx files.
|
protected String[] |
files
detected jaxx files in
init() method |
protected Map<String,jaxx.compiler.finalizers.JAXXCompilerFinalizer> |
finalizers
Finalizers available in engine.
|
protected String |
helpBrokerFQN
the FQN of help broker
By default, use the JAXX implementation
JAXXHelpBroker. |
protected boolean |
i18nable
To make compiler i18nable, says add the
I18n._(String, Object...)
method invocation on I18nHelper.I18N_ATTRIBUTES attributes. |
protected String[] |
includes
To filter file to treat.
|
protected Map<String,jaxx.compiler.spi.Initializer> |
initializers
Initializers available to init engine.
|
protected String |
jaxxContextFQN
The name of implementation of
JAXXContextto be used on JAXXObject. |
protected boolean |
optimize
To optimize generated code.
|
protected File |
outJava
Where to generate java files.
|
protected boolean |
profile
flag to activate profile mode.
|
protected boolean |
resetAfterCompile
Flag to keep compilers after the generate operation (usefull for tests.
|
protected boolean |
showBinding
To show detected bindings.
|
protected File |
src
Directory where jaxx files are located.
|
protected boolean |
testPhase
A flag to mark the mojo to be used in a test phase.
|
protected org.nuiton.io.MirroredFileUpdater |
updater
file updater used to detect jaxx files.
|
protected boolean |
useUIManagerForIcon
A flag to use UIManager to retreave icons.
|
generateHelp| Constructor and Description |
|---|
GenerateMojo() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
checkSkip() |
void |
doAction() |
protected void |
fixCompileSourceRoots() |
ClassLoader |
getClassLoader() |
Class<? extends jaxx.compiler.JAXXCompiler> |
getCompilerClass() |
Map<String,jaxx.compiler.CompiledObjectDecorator> |
getDecorators() |
Class<? extends jaxx.compiler.CompiledObjectDecorator> |
getDefaultDecoratorClass() |
Class<?> |
getDefaultErrorUI() |
jaxx.compiler.JAXXEngine |
getEngine() |
String[] |
getExtraImports() |
Map<String,jaxx.compiler.finalizers.JAXXCompilerFinalizer> |
getFinalizers() |
String |
getHelpBrokerFQN() |
Map<String,jaxx.compiler.spi.Initializer> |
getInitializers() |
Class<? extends jaxx.runtime.JAXXContext> |
getJaxxContextClass() |
boolean |
getOptimize() |
File |
getTargetDirectory() |
void |
init() |
boolean |
isAddLogger() |
boolean |
isAutoImportCss() |
boolean |
isAutoRecurseInCss() |
boolean |
isGenerateHelp() |
boolean |
isI18nable() |
boolean |
isOptimize() |
boolean |
isProfile() |
boolean |
isResetAfterCompile() |
boolean |
isShowClassDescriptorLoading() |
boolean |
isUseUIManagerForIcon() |
protected void |
report(jaxx.compiler.JAXXEngine engine) |
void |
setTargetDirectory(File targetDirectory) |
String |
toString() |
checkPackaging, getEncoding, getLastModified, getProject, isForce, isVerbose, setEncoding, setForce, setProject, setVerboseacceptPackaging, addCompileSourceRoots, addDirectoryToUrlsList, addResourceDir, addTestCompileSourceRoots, addTestResourceDir, addUrlToUrlsList, afterExecute, backupFile, checkEncoding, checkResource, checkRunOnceDone, copyFile, createDirectoryIfNecessary, createNewFile, deleteFile, execute, getBackupFile, getFileFromBasedir, getFilesToTreate, getFilesToTreateForRoots, getRootProject, getTemplate, hasClassPath, initClassLoader, isExecutionRoot, isFileNewerThanPomFile, rejectPackaging, removeCompileSourceRoots, removeTestCompileSourceRoots, renameFile, writeFilegetLog, getPluginContext, setLog, setPluginContext@Parameter(property="jaxx.src",
defaultValue="${basedir}/src/main/java")
protected File src
@Parameter(property="jaxx.outJava",
defaultValue="${basedir}/target/generated-sources/java")
protected File outJava
@Parameter(property="jaxx.includes") protected String[] includes
@Parameter(property="jaxx.excludes") protected String[] excludes
@Parameter(property="jaxx.compilerFQN",
defaultValue="jaxx.compiler.JAXXCompiler",
required=true)
protected String compilerFQN
@Parameter(property="jaxx.jaxxContextFQN",
defaultValue="jaxx.runtime.context.DefaultJAXXContext",
required=true)
protected String jaxxContextFQN
JAXXContextto be used on JAXXObject.
Must not be abstract.@Parameter(property="jaxx.defaultErrorUIFQN") protected String defaultErrorUIFQN
@Parameter(property="jaxx.defaultDecoratorFQN",
defaultValue="jaxx.compiler.decorators.DefaultCompiledObjectDecorator")
protected String defaultDecoratorFQN
CompiledObjectDecorator@Parameter(property="jaxx.addSourcesToClassPath",
defaultValue="false")
protected boolean addSourcesToClassPath
@Parameter(property="jaxx.addResourcesToClassPath",
defaultValue="false")
protected boolean addResourcesToClassPath
@Parameter(property="jaxx.addCompileClassPath",
defaultValue="false")
protected boolean addCompileClassPath
@Parameter(property="jaxx.addProjectClassPath",
defaultValue="false")
protected boolean addProjectClassPath
@Parameter(property="jaxx.testPhase",
defaultValue="false")
protected boolean testPhase
@Parameter(property="jaxx.i18nable",
defaultValue="true")
protected boolean i18nable
I18n._(String, Object...)
method invocation on I18nHelper.I18N_ATTRIBUTES attributes.I18nHelper@Parameter(property="jaxx.optimize",
defaultValue="false")
protected boolean optimize
@Parameter(property="jaxx.autoImportCss",
defaultValue="false")
protected boolean autoImportCss
@Parameter(property="jaxx.autoRecurseInCss",
defaultValue="true")
protected boolean autoRecurseInCss
false.@Parameter(property="jaxx.addLogger",
defaultValue="true")
protected boolean addLogger
@Parameter(property="jaxx.resetAfterCompile",
defaultValue="true")
protected boolean resetAfterCompile
@Parameter(property="jaxx.beanInfoSearchPath") protected String[] beanInfoSearchPath
Introspector.setBeanInfoSearchPath(String[]).
add beanInfoSearchPath to be registred by BeanInfoUtil.addJaxxBeanInfoPath(String...)
and then will be use by DefaultInitializer.initialize().
This permit to use real beanInfo of imported graphic libraries.@Parameter(property="jaxx.extraImportList") protected String extraImportList
@Parameter(property="jaxx.useUIManagerForIcon",
defaultValue="false")
protected boolean useUIManagerForIcon
@Parameter(property="jaxx.profile",
defaultValue="false")
protected boolean profile
@Parameter(property="jaxx.showBinding",
defaultValue="false")
protected boolean showBinding
@Parameter(property="jaxx.helpBrokerFQN",
defaultValue="jaxx.runtime.swing.help.JAXXHelpBroker")
protected String helpBrokerFQN
JAXXHelpBroker.@Component(role=jaxx.compiler.CompiledObjectDecorator.class) protected Map<String,jaxx.compiler.CompiledObjectDecorator> decorators
@Component(role=jaxx.compiler.finalizers.JAXXCompilerFinalizer.class) protected Map<String,jaxx.compiler.finalizers.JAXXCompilerFinalizer> finalizers
@Component(role=jaxx.compiler.spi.Initializer.class) protected Map<String,jaxx.compiler.spi.Initializer> initializers
protected org.nuiton.io.MirroredFileUpdater updater
AbstractJaxxMojo.verbose flag is on, will ne be usedprotected ClassLoader cl
public void init()
throws Exception
init in class org.nuiton.plugin.AbstractPluginExceptionprotected boolean checkSkip()
checkSkip in class org.nuiton.plugin.AbstractPluginpublic void doAction()
throws Exception
doAction in class org.nuiton.plugin.AbstractPluginExceptionpublic File getTargetDirectory()
getTargetDirectory in interface jaxx.compiler.CompilerConfigurationgetTargetDirectory in class AbstractJaxxMojopublic void setTargetDirectory(File targetDirectory)
setTargetDirectory in class AbstractJaxxMojopublic boolean getOptimize()
getOptimize in interface jaxx.compiler.CompilerConfigurationpublic boolean isAutoImportCss()
isAutoImportCss in interface jaxx.compiler.CompilerConfigurationpublic boolean isAutoRecurseInCss()
isAutoRecurseInCss in interface jaxx.compiler.CompilerConfigurationpublic boolean isI18nable()
isI18nable in interface jaxx.compiler.CompilerConfigurationpublic boolean isUseUIManagerForIcon()
isUseUIManagerForIcon in interface jaxx.compiler.CompilerConfigurationpublic boolean isAddLogger()
isAddLogger in interface jaxx.compiler.CompilerConfigurationpublic boolean isShowClassDescriptorLoading()
isShowClassDescriptorLoading in interface jaxx.compiler.CompilerConfigurationpublic Class<? extends jaxx.runtime.JAXXContext> getJaxxContextClass()
getJaxxContextClass in interface jaxx.compiler.CompilerConfigurationpublic String[] getExtraImports()
getExtraImports in interface jaxx.compiler.CompilerConfigurationpublic boolean isResetAfterCompile()
isResetAfterCompile in interface jaxx.compiler.CompilerConfigurationpublic boolean isOptimize()
isOptimize in interface jaxx.compiler.CompilerConfigurationpublic Class<?> getDefaultErrorUI()
getDefaultErrorUI in interface jaxx.compiler.CompilerConfigurationpublic ClassLoader getClassLoader()
getClassLoader in interface jaxx.compiler.CompilerConfigurationpublic Class<? extends jaxx.compiler.JAXXCompiler> getCompilerClass()
getCompilerClass in interface jaxx.compiler.CompilerConfigurationpublic Class<? extends jaxx.compiler.CompiledObjectDecorator> getDefaultDecoratorClass()
getDefaultDecoratorClass in interface jaxx.compiler.CompilerConfigurationpublic boolean isProfile()
isProfile in interface jaxx.compiler.CompilerConfigurationpublic boolean isGenerateHelp()
isGenerateHelp in interface jaxx.compiler.CompilerConfigurationpublic String getHelpBrokerFQN()
getHelpBrokerFQN in interface jaxx.compiler.CompilerConfigurationpublic Map<String,jaxx.compiler.CompiledObjectDecorator> getDecorators()
getDecorators in interface jaxx.compiler.CompilerConfigurationpublic Map<String,jaxx.compiler.finalizers.JAXXCompilerFinalizer> getFinalizers()
getFinalizers in interface jaxx.compiler.CompilerConfigurationpublic Map<String,jaxx.compiler.spi.Initializer> getInitializers()
getInitializers in interface jaxx.compiler.CompilerConfigurationpublic jaxx.compiler.JAXXEngine getEngine()
protected void fixCompileSourceRoots()
protected void report(jaxx.compiler.JAXXEngine engine)
Copyright © 2008-2012 CodeLutin. All Rights Reserved.