Class RootLoaderRef

  • All Implemented Interfaces:

    public class RootLoaderRef
    Sets the RootLoader as reference. Reexecution of this task will set a new instance of RootLoader for the reference. arguments:
    • ref
    • classpath
    all arguments are required. As ant requires an AntClassLoader as reference, this will create a RootLoader and set an AntClassLoader as child and stored in the reference. The AntClassLoader instance will not have a classpath nor will it have access to the classpath somehow, all loading is done by the RootLoader parent. To avoid problems with loading classes multiple times and using them at the same time, this task will filter out the ant jars and the commons-logging jars. This only works if the ant jars are starting with "ant-" and the logging jar starts with "commons-logging-". This was needed because if ant wants to access a task argument that uses for example a Path it look for a matching method which includes a matching class. But two classes of the same name with different classloaders are different, so ant would not be able to find the method.
    See Also:
    • Field Summary

      • Fields inherited from class

      • Fields inherited from class

        target, taskName, taskType, wrapper
      • Fields inherited from class

        description, location, project
    • Constructor Summary

      Constructor Description
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description createClasspath()
      Adds a path to the classpath.
      void execute()  
      void setClasspath​( classpath)
      Set the classpath to be used for this compilation.
      void setClasspathRef​( r)
      Adds a reference to a classpath defined elsewhere.
      void setRef​(java.lang.String n)
      sets the name of the reference which should store the Loader
      • Methods inherited from class

        add, addAnd, addContains, addContainsRegexp, addCustom, addDate, addDepend, addDepth, addDifferent, addFilename, addMajority, addModified, addNone, addNot, addOr, addPresent, addSelector, addSize, addType, appendSelector, createExclude, createExcludesFile, createInclude, createIncludesFile, createPatternSet, getDirectoryScanner, getImplicitFileSet, getSelectors, hasSelectors, selectorCount, selectorElements, setCaseSensitive, setDefaultexcludes, setExcludes, setExcludesfile, setFollowSymlinks, setIncludes, setIncludesfile, setProject, XsetIgnore, XsetItems
      • Methods inherited from class

        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

        clone, getDescription, getLocation, getProject, setDescription, setLocation
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RootLoaderRef

        public RootLoaderRef()
    • Method Detail

      • setRef

        public void setRef​(java.lang.String n)
        sets the name of the reference which should store the Loader
      • execute

        public void execute()
        execute in class
      • setClasspath

        public void setClasspath​( classpath)
        Set the classpath to be used for this compilation.
        classpath - an Ant Path object containing the compilation classpath.
      • setClasspathRef

        public void setClasspathRef​( r)
        Adds a reference to a classpath defined elsewhere.
        r - a reference to a classpath
      • createClasspath

        public createClasspath()
        Adds a path to the classpath.
        a class path to be configured