Top Description Inners Fields Constructors Methods
com.sun.tools.jxc

public abstract Class ApBasedTask

extends Javac
Class Inheritance
Known Direct Subclasses
com.sun.tools.jxc.SchemaGenBase
Annotations
@SuppressWarnings:exports
Imports
org.apache.tools.ant.BuildException, .Project, org.apache.tools.ant.taskdefs.Javac, org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter, org.apache.tools.ant.types.Commandline, javax.annotation.processing.Processor, javax.tools.Diagnostic, .DiagnosticCollector, .JavaCompiler, .JavaFileObject, .StandardJavaFileManager, .ToolProvider, java.io.File, java.util.Arrays, .Collections

Base class for tasks that eventually invoke annotation processing.
Author
Kohsuke Kawaguchi

Nested and Inner Type Summary

Modifier and TypeClass and Description
private abstract class
private class
ApBasedTask.InternalApAdapter

Adapter to invoke Ap internally.

Field Summary

Inherited from org.apache.tools.ant.taskdefs.Javac:
compileListfailOnErrorlistFiles

Constructor Summary

AccessConstructor and Description
protected
ApBasedTask()

Default constructor.

Method Summary

Modifier and TypeMethod and Description
protected void
compile()

Overrides org.apache.tools.ant.taskdefs.Javac.compile.

Perform the compilation.

protected abstract String
protected abstract String
protected abstract Processor

Returns:

a factory
getProcessor
()

Creates a factory that does the actual job.

protected abstract void
setupCommandlineSwitches(Commandline
command line
cmd
)

Implemented by the derived class to set up command line switches passed to annotation processing.

Inherited from org.apache.tools.ant.taskdefs.Javac:
addcheckParameterscreateBootclasspathcreateClasspathcreateCompilerArgcreateCompilerClasspathcreateExtdirscreateModulepathcreateModulesourcepathcreateSourcepathcreateSrccreateUpgrademodulepathexecutegetBootclasspathgetClasspathgetCompilergetCompilerVersiongetCurrentCompilerArgsgetDebuggetDebugLevelgetDependgetDeprecationgetDestdirgetEncodinggetExecutablegetExtdirsgetFailonerrorgetFileListgetIncludeantruntimegetIncludejavaruntimegetJavacExecutablegetListfilesgetMemoryInitialSizegetMemoryMaximumSizegetModulepathgetModulesourcepathgetNativeHeaderDirgetNowarngetOptimizegetReleasegetSourcegetSourcepathgetSrcdirgetSystemJavacgetTargetgetTaskSuccessgetTempdirgetUpgrademodulepathgetVerboseisForkedJavacisIncludeDestClassesisJdkCompilerrecreateSrcresetFileListsscanDirsetBootclasspathsetBootClasspathRefsetClasspathsetClasspathRefsetCompilersetCreateMissingPackageInfoClasssetDebugsetDebugLevelsetDependsetDeprecationsetDestdirsetEncodingsetErrorPropertysetExecutablesetExtdirssetFailonerrorsetForksetIncludeantruntimesetIncludeDestClassessetIncludejavaruntimesetListfilessetMemoryInitialSizesetMemoryMaximumSizesetModulepathsetModulepathRefsetModulesourcepathsetModulesourcepathRefsetNativeHeaderDirsetNowarnsetOptimizesetProceedsetReleasesetSourcesetSourcepathsetSourcepathRefsetSrcdirsetTargetsetTempdirsetUpdatedPropertysetUpgrademodulepathsetUpgrademodulepathRefsetVerbose

Constructor Detail

ApBasedTaskback to summary
protected ApBasedTask()

Default constructor.

Method Detail

compileback to summary
protected void compile()

Overrides org.apache.tools.ant.taskdefs.Javac.compile.

Doc from org.apache.tools.ant.taskdefs.Javac.compile.

Perform the compilation.

Annotations
@Override
getCompilationMessageback to summary
protected abstract String getCompilationMessage()
getFailedMessageback to summary
protected abstract String getFailedMessage()
getProcessorback to summary
protected abstract Processor getProcessor()

Creates a factory that does the actual job.

Returns:Processor

a factory

setupCommandlineSwitchesback to summary
protected abstract void setupCommandlineSwitches(Commandline cmd)

Implemented by the derived class to set up command line switches passed to annotation processing.

Parameters
cmd:Commandline

command line

com.sun.tools.jxc back to summary

private abstract Class ApBasedTask.ApAdapter

extends DefaultCompilerAdapter
Class Inheritance
Known Direct Subclasses
com.sun.tools.jxc.ApBasedTask.InternalApAdapter

Field Summary

Inherited from org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter:
attributesbootclasspathcompileClasspathcompileListcompileSourcepathdebugdependdeprecationdestDirencodingextdirsincludeAntRuntimeincludeJavaRuntimelocationlSepmemoryInitialSizememoryMaximumSizemodulepathmoduleSourcepathoptimizeprojectreleasesrctargetupgrademodulepathverbose

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
protected void
logAndAddFilesToCompile(Commandline cmd)

Overrides org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter.logAndAddFilesToCompile.

Logs the compilation parameters, adds the files to compile and logs the "niceSourceList"

protected Commandline
Inherited from org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter:
addCurrentCompilerArgsaddExtdirsToClasspathassumeJava10PlusassumeJava11assumeJava12assumeJava13assumeJava14assumeJava15assumeJava16assumeJava17assumeJava18assumeJava19assumeJava1_1PlusassumeJava1_2PlusassumeJava1_3PlusassumeJava1_4PlusassumeJava1_5PlusassumeJava1_6PlusassumeJava1_7PlusassumeJava1_8PlusassumeJava9assumeJava9PlusexecuteExternalCompileexecuteExternalCompilegetBootClassPathgetCompileClasspathgetJavacgetModulepathgetModulesourcepathgetNoDebugArgumentgetProjectgetSupportedFileExtensionsgetUpgrademodulepathsetJavacsetupJavacCommandsetupJavacCommandsetupJavacCommandlineSwitchessetupJavacCommandlineSwitchessetupModernJavacCommand

Constructor Detail

ApAdapterback to summary
protected ApAdapter()

Method Detail

logAndAddFilesToCompileback to summary
protected void logAndAddFilesToCompile(Commandline cmd)

Overrides org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter.logAndAddFilesToCompile.

Doc from org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter.logAndAddFilesToCompile.

Logs the compilation parameters, adds the files to compile and logs the "niceSourceList"

Annotations
@Override
setupModernJavacCommandlineSwitchesback to summary
protected Commandline setupModernJavacCommandlineSwitches(Commandline cmd)

Overrides org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter.setupModernJavacCommandlineSwitches.

Doc from org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter.setupModernJavacCommandlineSwitches.

Does the command line argument processing for modern. Doesn't add the files to compile.

Annotations
@Override
com.sun.tools.jxc back to summary

private final Class ApBasedTask.InternalApAdapter

extends ApAdapter
Class Inheritance

Adapter to invoke Ap internally.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public boolean
Inherited from com.sun.tools.jxc.ApBasedTask.ApAdapter:
logAndAddFilesToCompilesetupModernJavacCommandlineSwitches

Constructor Detail

InternalApAdapterback to summary
private InternalApAdapter()

Method Detail

executeback to summary
public boolean execute() throws BuildException

Implements org.apache.tools.ant.taskdefs.compilers.CompilerAdapter.execute.

Doc from org.apache.tools.ant.taskdefs.compilers.CompilerAdapter.execute.

Executes the task.

Annotations
@Override
Exceptions
BuildException:
on error