Cloneable, org.apache.tools.ant.DynamicAttribute, org.apache.tools.ant.DynamicConfigurator, org.apache.tools.ant.DynamicElementpublic abstract class ProtectedTask
extends org.apache.tools.ant.Task
implements org.apache.tools.ant.DynamicConfigurator
Task in a special class loader that allows
us to control where to load 2.1 APIs, even if we run in Java 6.
No JDK 1.5 code here, please. This allows us to detect "require JDK5" bug nicely.
| Constructor | Description |
|---|---|
ProtectedTask() |
| Modifier and Type | Method | Description |
|---|---|---|
protected abstract ClassLoader |
createClassLoader() |
Creates a protective class loader that will host the actual task.
|
Object |
createDynamicElement(String name) |
|
void |
execute() |
|
protected abstract String |
getCoreClassName() |
Returns the name of the class that extends
Task. |
void |
setDynamicAttribute(String name,
String value) |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclone, getDescription, getLocation, getProject, setDescription, setLocation, setProjectbindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskTypepublic void setDynamicAttribute(String name, String value) throws org.apache.tools.ant.BuildException
setDynamicAttribute in interface org.apache.tools.ant.DynamicAttributeorg.apache.tools.ant.BuildExceptionpublic Object createDynamicElement(String name) throws org.apache.tools.ant.BuildException
createDynamicElement in interface org.apache.tools.ant.DynamicElementorg.apache.tools.ant.BuildExceptionpublic void execute()
throws org.apache.tools.ant.BuildException
execute in class org.apache.tools.ant.Taskorg.apache.tools.ant.BuildExceptionprotected abstract String getCoreClassName()
Task.
This class will be loaded int the protected classloader.protected abstract ClassLoader createClassLoader() throws ClassNotFoundException, IOException
ClassNotFoundExceptionIOExceptionCopyright © 2018 Oracle Corporation. All rights reserved.