org.schmant.task.template.jdk.java
Class AbstractExtJavaTaskDecorator<T extends AbstractExtJavaTaskDecorator<T>>

java.lang.Object
  extended by org.schmant.support.AbstractArgumentChecker
      extended by org.schmant.task.template.jdk.java.AbstractExtJavaTaskDecorator<T>
All Implemented Interfaces:
TaskDecorator, ExtJavaTaskDecorator<T>, ValidatingDecorator

public abstract class AbstractExtJavaTaskDecorator<T extends AbstractExtJavaTaskDecorator<T>>
extends AbstractArgumentChecker
implements ExtJavaTaskDecorator<T>

This is an abstract implementation of ExtJavaTaskDecorator that can be used as a starting point for a custom implementation.

All methods in this class return null.

Since:
0.5
Author:
Karl Gustafsson

Constructor Summary
AbstractExtJavaTaskDecorator()
           
 
Method Summary
 List<? extends EntityView> getClasspathEntries()
          Get a list of file-backed classpath entries.
 File getJavaExecutable()
          Return the path to an executable (external program) that the decorator wants, or null if the decorator doesn't care.
 Collection<String> getJvmOptions()
          Return a collection of JVM options that the decorator wants to set.
 Collection<String> getProgramArguments()
          Return a collection of program arguments that the decorator wants to set.
 
Methods inherited from class org.schmant.support.AbstractArgumentChecker
check, check, check, check
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.schmant.task.ValidatingDecorator
validate
 

Constructor Detail

AbstractExtJavaTaskDecorator

public AbstractExtJavaTaskDecorator()
Method Detail

getJavaExecutable

public File getJavaExecutable()
Description copied from interface: ExtJavaTaskDecorator
Return the path to an executable (external program) that the decorator wants, or null if the decorator doesn't care. This can be used if the decorator wants to run another program than java, or if it wants a specific Java version.

Specified by:
getJavaExecutable in interface ExtJavaTaskDecorator<T extends AbstractExtJavaTaskDecorator<T>>
Returns:
null.

getJvmOptions

public Collection<String> getJvmOptions()
Description copied from interface: ExtJavaTaskDecorator
Return a collection of JVM options that the decorator wants to set.

Specified by:
getJvmOptions in interface ExtJavaTaskDecorator<T extends AbstractExtJavaTaskDecorator<T>>
Returns:
null.

getClasspathEntries

public List<? extends EntityView> getClasspathEntries()
Get a list of file-backed classpath entries.

Specified by:
getClasspathEntries in interface ExtJavaTaskDecorator<T extends AbstractExtJavaTaskDecorator<T>>
Returns:
null.

getProgramArguments

public Collection<String> getProgramArguments()
Description copied from interface: ExtJavaTaskDecorator
Return a collection of program arguments that the decorator wants to set. The program arguments are added first in the program argument list.

If a decorator adds program arguments, the launched class must know how to handle them.

Specified by:
getProgramArguments in interface ExtJavaTaskDecorator<T extends AbstractExtJavaTaskDecorator<T>>
Returns:
null.