|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
com.sun.istack.tools.ProtectedTask
public abstract class ProtectedTask
Executes a 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.
Field Summary |
---|
Fields inherited from class org.apache.tools.ant.Task |
---|
target, taskName, taskType, wrapper |
Fields inherited from class org.apache.tools.ant.ProjectComponent |
---|
description, location, project |
Constructor Summary | |
---|---|
ProtectedTask()
|
Method Summary | |
---|---|
protected abstract java.lang.ClassLoader |
createClassLoader()
Creates a protective class loader that will host the actual task. |
java.lang.Object |
createDynamicElement(java.lang.String name)
|
void |
execute()
|
protected abstract java.lang.String |
getCoreClassName()
Returns the name of the class that extends Task . |
void |
setDynamicAttribute(java.lang.String name,
java.lang.String value)
|
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, setTaskType |
Methods inherited from class org.apache.tools.ant.ProjectComponent |
---|
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ProtectedTask()
Method Detail |
---|
public void setDynamicAttribute(java.lang.String name, java.lang.String value) throws org.apache.tools.ant.BuildException
setDynamicAttribute
in interface org.apache.tools.ant.DynamicAttribute
org.apache.tools.ant.BuildException
public java.lang.Object createDynamicElement(java.lang.String name) throws org.apache.tools.ant.BuildException
createDynamicElement
in interface org.apache.tools.ant.DynamicElement
org.apache.tools.ant.BuildException
public void execute() throws org.apache.tools.ant.BuildException
execute
in class org.apache.tools.ant.Task
org.apache.tools.ant.BuildException
protected abstract java.lang.String getCoreClassName()
Task
.
This class will be loaded int the protected classloader.
protected abstract java.lang.ClassLoader createClassLoader() throws java.lang.ClassNotFoundException, java.io.IOException
java.lang.ClassNotFoundException
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |