Class ACTask
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
com.sun.codemodel.ac.ACTask
- All Implemented Interfaces:
Cloneable
public class ACTask
extends org.apache.tools.ant.Task
Annotation compiler ant task.
This task reads annotation classes and generate strongly-typed writers.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classNested <classes> elements.static classNested <endorse> elements. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.apache.tools.ant.types.PathUsed to load additional user-specified classes.private JCodeModelGenerated interfaces go into this codeModel.private FileOutput directoryprivate final List<ACTask.Classes> private JPackageThe writers will be generated into this package.private final Map<Class, JDefinedClass> Map from annotation classes to their writers.private ClassLoaderUsed during the build to load annotation classes.Fields 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 TypeMethodDescriptionvoidList of classes to be handledvoidList of endorsed jarsorg.apache.tools.ant.types.PathNested <classpath> element.voidexecute()private static StringgetShortName(String className) Gets the short name from a fully-qualified name.private voidProcess a file.private voidprocessDir(File dir, String prefix) Visits a directory and looks for classes that match the specified pattern.private voidprocessJar(File jarfile) Visits a jar fil and looks for classes that match the specified pattern.private voidQueues a file for generation.voidsetClasspath(org.apache.tools.ant.types.Path cp) Nested <classpath> element.voidsetClasspathRef(org.apache.tools.ant.types.Reference r) voidsetDestdir(File output) voidsetPackage(String pkgName) voidsetProject(org.apache.tools.ant.Project project) Methods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, 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
-
Field Details
-
classpath
private final org.apache.tools.ant.types.Path classpathUsed to load additional user-specified classes. -
endorsedJars
-
patterns
-
userLoader
Used during the build to load annotation classes. -
codeModel
Generated interfaces go into this codeModel. -
pkg
The writers will be generated into this package. -
output
Output directory -
queue
Map from annotation classes to their writers.
-
-
Constructor Details
-
ACTask
public ACTask()
-
-
Method Details
-
setProject
public void setProject(org.apache.tools.ant.Project project) - Overrides:
setProjectin classorg.apache.tools.ant.ProjectComponent
-
setPackage
-
setClasspath
public void setClasspath(org.apache.tools.ant.types.Path cp) Nested <classpath> element. -
createClasspath
public org.apache.tools.ant.types.Path createClasspath()Nested <classpath> element. -
setClasspathRef
public void setClasspathRef(org.apache.tools.ant.types.Reference r) -
setDestdir
-
addConfiguredClasses
List of classes to be handled -
addConfiguredEndorse
List of endorsed jars -
execute
public void execute() throws org.apache.tools.ant.BuildException- Overrides:
executein classorg.apache.tools.ant.Task- Throws:
org.apache.tools.ant.BuildException
-
processJar
Visits a jar fil and looks for classes that match the specified pattern. -
processDir
-
process
Process a file.- Parameters:
name- such as "javax/xml/bind/Abc.class"
-
queue
Queues a file for generation. -
getShortName
-