org.schmant.task.template.jdk.javac
Class AbstractJavacTaskFactory<T extends AbstractJavacTaskFactory<T,U>,U extends AbstractJavacTask<U>>

java.lang.Object
  extended by org.schmant.task.stub.AbstractTaskFactory<T,U>
      extended by org.schmant.task.stub.AbstractActionTaskFactory<T,U>
          extended by org.schmant.task.stub.AbstractProcessTaskFactory<T,U>
              extended by org.schmant.task.template.jdk.javac.AbstractJavacTaskFactory<T,U>
All Implemented Interfaces:
ActionTaskConfigurable<T>, ActionTaskFactory<T,U>, ArgumentsConfigurable<T>, ClasspathConfigurable<T>, LoggingConfigurable<T>, OverwriteConfigurable<T>, SourceConfigurable<T>, TargetConfigurable<T>, GeneratorTaskConfigurable<T>, GeneratorTaskFactory<T,U>, ProcessTaskConfigurable<T>, ProcessTaskFactory<T,U>, TaskFactory<T,U>, TaskRunnable, JavacTaskConfigurable<T>, JavacTaskFactory<T,U>
Direct Known Subclasses:
ExtJavacTF, Jdk6JavacTF

public abstract class AbstractJavacTaskFactory<T extends AbstractJavacTaskFactory<T,U>,U extends AbstractJavacTask<U>>
extends AbstractProcessTaskFactory<T,U>
implements JavacTaskFactory<T,U>

Abstract base class for javac task factory implementations.

Since:
0.5
Author:
Karl Gustafsson

Field Summary
 
Fields inherited from interface org.schmant.task.confable.OverwriteConfigurable
DEFAULT_OVERWRITE_STRATEGY
 
Constructor Summary
AbstractJavacTaskFactory()
           
 
Method Summary
 T addAnnotationProcessor(String n)
           
 T addAnnotationProcessorOption(String key, String value)
           
 T addAnnotationProcessorOptions(Map<String,String> m)
           
 T addAnnotationProcessors(Object o)
           
 T addArgument(String s)
          Add one argument.
 T addArguments(Object o)
          Add one or several arguments.
 T addClasspathDecorator(PathDecorator<?,?> cd)
          Add one path decorator.
 T addClasspathDecorators(Object o)
          Add one or several path decorators.
 T addClasspathEntries(Object o)
          This method does the same as ClasspathConfigurable.addClasspathEntry(Object).
 T addClasspathEntry(Object o)
          Add one or several classpath entries to the classpath.
 T addDebugOption(JavacDebugKeyword j)
           
 T addDebugOptions(Object o)
           
 T clearAnnotationProcessorOptions()
           
 T clearAnnotationProcessors()
           
 T clearArguments()
          Clear the list of arguments.
 T clearClasspathDecorators()
          Clear the list of classpath decorators.
 T clearClasspathEntries()
          Clear the list of classpath entries.
 T clearDebugOptions()
           
 T setAnnotationProcessingMode(JavacAnnotationProcessingMode m)
           
 T setAnnotationProcessorPath(Object o)
           
 T setDeprecation(boolean b)
           
 T setEncoding(String encoding)
           
 T setImplicitClassFileGeneration(JavacImplicitClassFileGeneration j)
           
 T setNowarn(boolean b)
           
 T setSourceCodeVersion(String v)
          Corresponds to javac's -source flag
 T setSourceFilesDir(Object o)
           
 T setTargetVersion(String v)
          Corresponds to javac's -target flag
 
Methods inherited from class org.schmant.task.stub.AbstractProcessTaskFactory
setOverwrite, setOverwriteStrategy, setTarget
 
Methods inherited from class org.schmant.task.stub.AbstractActionTaskFactory
addSource, addSources, clearSources, setRelativeToBase, setSource, setSources
 
Methods inherited from class org.schmant.task.stub.AbstractTaskFactory
copy, create, createSpecification, getLastCreated, getSpecification, getThis, run, setLogFooter, setLogHeader, setReportLevel, setTraceLogging, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.schmant.task.TaskFactory
copy, create, getLastCreated, getSpecification
 
Methods inherited from interface org.schmant.task.confable.LoggingConfigurable
setLogFooter, setLogHeader, setReportLevel, setTraceLogging
 
Methods inherited from interface org.schmant.task.TaskRunnable
run
 
Methods inherited from interface org.schmant.task.confable.SourceConfigurable
addSource, addSources, clearSources, setRelativeToBase, setSource, setSources
 
Methods inherited from interface org.schmant.task.confable.TargetConfigurable
setTarget
 
Methods inherited from interface org.schmant.task.confable.OverwriteConfigurable
setOverwrite, setOverwriteStrategy
 

Constructor Detail

AbstractJavacTaskFactory

public AbstractJavacTaskFactory()
Method Detail

setTargetVersion

public final T setTargetVersion(String v)
Corresponds to javac's -target flag

Specified by:
setTargetVersion in interface JavacTaskConfigurable<T extends AbstractJavacTaskFactory<T,U>>

setSourceCodeVersion

public final T setSourceCodeVersion(String v)
Corresponds to javac's -source flag

Specified by:
setSourceCodeVersion in interface JavacTaskConfigurable<T extends AbstractJavacTaskFactory<T,U>>

addClasspathEntry

public final T addClasspathEntry(Object o)
Description copied from interface: ClasspathConfigurable
Add one or several classpath entries to the classpath.

Specified by:
addClasspathEntry in interface ClasspathConfigurable<T extends AbstractJavacTaskFactory<T,U>>
Parameters:
o - The entry or entries. If the object is a collection or array, it is flattened (see FlatteningList). It is up to the implementing object to decide how the object or objects should be interpreted.
Returns:
this

addClasspathEntries

public final T addClasspathEntries(Object o)
Description copied from interface: ClasspathConfigurable
This method does the same as ClasspathConfigurable.addClasspathEntry(Object).

Specified by:
addClasspathEntries in interface ClasspathConfigurable<T extends AbstractJavacTaskFactory<T,U>>
Parameters:
o - The entries. See ClasspathConfigurable.addClasspathEntry(Object).
Returns:
this

clearClasspathEntries

public final T clearClasspathEntries()
Description copied from interface: ClasspathConfigurable
Clear the list of classpath entries.

Specified by:
clearClasspathEntries in interface ClasspathConfigurable<T extends AbstractJavacTaskFactory<T,U>>
Returns:
this.

addClasspathDecorator

public final T addClasspathDecorator(PathDecorator<?,?> cd)
Description copied from interface: ClasspathConfigurable
Add one path decorator.

Specified by:
addClasspathDecorator in interface ClasspathConfigurable<T extends AbstractJavacTaskFactory<T,U>>
Returns:
this

addClasspathDecorators

public final T addClasspathDecorators(Object o)
Description copied from interface: ClasspathConfigurable
Add one or several path decorators.

Specified by:
addClasspathDecorators in interface ClasspathConfigurable<T extends AbstractJavacTaskFactory<T,U>>
Parameters:
o - One or an array or collection of classpath decorators (PathDecorator objects).
Returns:
this

clearClasspathDecorators

public final T clearClasspathDecorators()
Description copied from interface: ClasspathConfigurable
Clear the list of classpath decorators.

Specified by:
clearClasspathDecorators in interface ClasspathConfigurable<T extends AbstractJavacTaskFactory<T,U>>
Returns:
this

addArgument

public final T addArgument(String s)
Description copied from interface: ArgumentsConfigurable
Add one argument.

Specified by:
addArgument in interface ArgumentsConfigurable<T extends AbstractJavacTaskFactory<T,U>>
Parameters:
s - The argument.
Returns:
this

addArguments

public final T addArguments(Object o)
Description copied from interface: ArgumentsConfigurable
Add one or several arguments.

Specified by:
addArguments in interface ArgumentsConfigurable<T extends AbstractJavacTaskFactory<T,U>>
Parameters:
o - An argument or an array or Collection of arguments. If this is an array or a collection, it is flattened as described in FlatteningList.
Returns:
this

clearArguments

public final T clearArguments()
Description copied from interface: ArgumentsConfigurable
Clear the list of arguments.

Specified by:
clearArguments in interface ArgumentsConfigurable<T extends AbstractJavacTaskFactory<T,U>>
Returns:
this.

setEncoding

public final T setEncoding(String encoding)
Specified by:
setEncoding in interface JavacTaskConfigurable<T extends AbstractJavacTaskFactory<T,U>>

addAnnotationProcessorOption

public final T addAnnotationProcessorOption(String key,
                                            String value)
Specified by:
addAnnotationProcessorOption in interface JavacTaskConfigurable<T extends AbstractJavacTaskFactory<T,U>>

addAnnotationProcessorOptions

public final T addAnnotationProcessorOptions(Map<String,String> m)
Specified by:
addAnnotationProcessorOptions in interface JavacTaskConfigurable<T extends AbstractJavacTaskFactory<T,U>>

clearAnnotationProcessorOptions

public final T clearAnnotationProcessorOptions()
Specified by:
clearAnnotationProcessorOptions in interface JavacTaskConfigurable<T extends AbstractJavacTaskFactory<T,U>>

setDeprecation

public final T setDeprecation(boolean b)
Specified by:
setDeprecation in interface JavacTaskConfigurable<T extends AbstractJavacTaskFactory<T,U>>

addDebugOption

public final T addDebugOption(JavacDebugKeyword j)
Specified by:
addDebugOption in interface JavacTaskConfigurable<T extends AbstractJavacTaskFactory<T,U>>

addDebugOptions

public final T addDebugOptions(Object o)
Specified by:
addDebugOptions in interface JavacTaskConfigurable<T extends AbstractJavacTaskFactory<T,U>>

clearDebugOptions

public final T clearDebugOptions()
Specified by:
clearDebugOptions in interface JavacTaskConfigurable<T extends AbstractJavacTaskFactory<T,U>>

setImplicitClassFileGeneration

public final T setImplicitClassFileGeneration(JavacImplicitClassFileGeneration j)
Specified by:
setImplicitClassFileGeneration in interface JavacTaskConfigurable<T extends AbstractJavacTaskFactory<T,U>>

setNowarn

public final T setNowarn(boolean b)
Specified by:
setNowarn in interface JavacTaskConfigurable<T extends AbstractJavacTaskFactory<T,U>>

setAnnotationProcessingMode

public final T setAnnotationProcessingMode(JavacAnnotationProcessingMode m)
Specified by:
setAnnotationProcessingMode in interface JavacTaskConfigurable<T extends AbstractJavacTaskFactory<T,U>>

addAnnotationProcessor

public final T addAnnotationProcessor(String n)
Specified by:
addAnnotationProcessor in interface JavacTaskConfigurable<T extends AbstractJavacTaskFactory<T,U>>

addAnnotationProcessors

public final T addAnnotationProcessors(Object o)
Specified by:
addAnnotationProcessors in interface JavacTaskConfigurable<T extends AbstractJavacTaskFactory<T,U>>

clearAnnotationProcessors

public final T clearAnnotationProcessors()
Specified by:
clearAnnotationProcessors in interface JavacTaskConfigurable<T extends AbstractJavacTaskFactory<T,U>>

setAnnotationProcessorPath

public final T setAnnotationProcessorPath(Object o)
Specified by:
setAnnotationProcessorPath in interface JavacTaskConfigurable<T extends AbstractJavacTaskFactory<T,U>>

setSourceFilesDir

public final T setSourceFilesDir(Object o)
Specified by:
setSourceFilesDir in interface JavacTaskConfigurable<T extends AbstractJavacTaskFactory<T,U>>