Class EnhancerTask
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.apache.tools.ant.taskdefs.Java
org.datanucleus.enhancer.EnhancerTask
- All Implemented Interfaces:
Cloneable
public class EnhancerTask
extends org.apache.tools.ant.taskdefs.Java
Enhancer Ant Task.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate File(package private) List<org.apache.tools.ant.types.FileSet> Filesets of metadata files or class files to be enhanced.private StringThe suffixes of the files to use.private StringOnly runs this task if the property is set.Fields inherited from class org.apache.tools.ant.taskdefs.Java
redirector, redirectorElementFields inherited from class org.apache.tools.ant.Task
target, taskName, taskType, wrapperFields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddFileSet(org.apache.tools.ant.types.FileSet fs) Add a fileset.voidexecute()Execution methodgetDir()Gets the root dir for looking for filesprivate org.apache.tools.ant.DirectoryScannergetDirectoryScanner(File dir) protected File[]getFiles()voidsetAlwaysDetachable(boolean detachable) set always detachable.voidset API AdaptervoidsetCheckonly(boolean checkonly) Whether to just check the enhancement statevoidsetDestination(File destdir) set output directoryvoidsetDetachListener(boolean flag) Whether to use detach listener.voidSets the root dir for looking for filesvoidsetFileSuffixes(String suffixes) Set one or more file suffixes for the input files.voidsetGenerateConstructor(boolean flag) Whether to allow generation of default constructor where required.voidsetGeneratePK(boolean flag) Whether to allow generation of PKs where required.voidvoidsetPersistenceUnit(String unit) Set the persistence-unit name to enhancevoidsetQuiet(boolean quiet) set quietvoidsetVerbose(boolean verbose) set verboseMethods inherited from class org.apache.tools.ant.taskdefs.Java
addAssertions, addConfiguredRedirector, addEnv, addSysproperty, addSyspropertyset, checkConfiguration, clearArgs, createArg, createBootclasspath, createClasspath, createJvmarg, createModulepath, createPermissions, createUpgrademodulepath, createWatchdog, executeJava, executeJava, getCommandLine, getSysProperties, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, maybeSetResultPropertyValue, run, setAppend, setArgs, setClassname, setClasspath, setClasspathRef, setCloneVm, setDiscardError, setDiscardOutput, setError, setErrorProperty, setFailonerror, setFork, setInput, setInputString, setJar, setJvm, setJvmargs, setJVMVersion, setLogError, setMaxmemory, setModule, setModulepath, setModulepathRef, setNewenvironment, setOutput, setOutputproperty, setResultProperty, setSourceFile, setSpawn, setTimeout, setupRedirectorMethods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskTypeMethods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
-
Field Details
-
dir
-
ifpropertyset
Only runs this task if the property is set. -
fileSuffixes
The suffixes of the files to use. Defaults to files suffixed "jdo". -
filesets
List<org.apache.tools.ant.types.FileSet> filesetsFilesets of metadata files or class files to be enhanced.
-
-
Constructor Details
-
EnhancerTask
public EnhancerTask()Default constructor
-
-
Method Details
-
execute
public void execute() throws org.apache.tools.ant.BuildExceptionExecution method- Overrides:
executein classorg.apache.tools.ant.taskdefs.Java- Throws:
org.apache.tools.ant.BuildException- Thrown when an error occurs when processing the task
-
setCheckonly
public void setCheckonly(boolean checkonly) Whether to just check the enhancement state- Parameters:
checkonly- Whether to just check
-
setGeneratePK
public void setGeneratePK(boolean flag) Whether to allow generation of PKs where required.- Parameters:
flag- Allow PK generation
-
setGenerateConstructor
public void setGenerateConstructor(boolean flag) Whether to allow generation of default constructor where required.- Parameters:
flag- Allow default constructor addition
-
setDetachListener
public void setDetachListener(boolean flag) Whether to use detach listener.- Parameters:
flag- to detach listener use
-
getDirectoryScanner
-
setDestination
-
setApi
-
setPersistenceUnit
Set the persistence-unit name to enhance- Parameters:
unit- Name of the persistence-unit to enhance
-
setDir
Sets the root dir for looking for files- Overrides:
setDirin classorg.apache.tools.ant.taskdefs.Java- Parameters:
dir- the root dir
-
getDir
-
setFileSuffixes
Set one or more file suffixes for the input files. Suffixes are separated with a comma(,)- Parameters:
suffixes- the suffices
-
setAlwaysDetachable
public void setAlwaysDetachable(boolean detachable) set always detachable.- Parameters:
detachable- Whether all enhanced classes should be detachable
-
setVerbose
public void setVerbose(boolean verbose) set verbose- Parameters:
verbose- Whether to give verbose output
-
setQuiet
public void setQuiet(boolean quiet) set quiet- Parameters:
quiet- Whether to give no output
-
addFileSet
public void addFileSet(org.apache.tools.ant.types.FileSet fs) Add a fileset. @see ant manual- Parameters:
fs- the FileSet
-
getFiles
-
setIf
-