Package org.apache.tools.ant.types.resources

Examples of org.apache.tools.ant.types.resources.Union


    /**
     * Adds resources that will be checked.
     */
    public void add(ResourceCollection rc) {
        if (nestedResources == null) {
            nestedResources = new Union();
        }
        nestedResources.add(rc);
    }
View Full Code Here


    getPath().add(set);
  }

  private synchronized Union getPath() {
    if (path == null) {
      path = new Union();
      path.setProject(getProject());
    }
    return path;
  }
View Full Code Here

     * @param rc resource collection to add.
     * @since Ant 1.7
     */
    public void add(ResourceCollection rc) {
        if (resources == null) {
            resources = new Union();
        }
        resources.add(rc);
    }
View Full Code Here

    /**
     * Create a nested sources element.
     * @return a Union instance.
     */
    public synchronized Union createSources() {
        sources = (sources == null) ? new Union() : sources;
        return sources;
    }
View Full Code Here

            throw noChildrenAllowed();
        }
        if (control != null) {
            throw oneControl();
        }
        control = new Union();
        return control;
    }
View Full Code Here

        checkChildrenAllowed();
        if (c == null) {
            return;
        }
        if (union == null) {
            union = new Union();
            union.setProject(getProject());
            union.setCache(false);
        }
        union.add(c);
        setChecked(false);
View Full Code Here

        getPath().add(rc);
    }

    private synchronized Union getPath() {
        if (path == null) {
            path = new Union();
            path.setProject(getProject());
        }
        return path;
    }
View Full Code Here

    /**
     * Do the execution.
     * @throws BuildException if something is invalid.
     */
    public void execute() throws BuildException {
        Union savedPath = path;
        String savedPathSep = pathSep; // may be altered in validateSetup
        String savedDirSep = dirSep; // may be altered in validateSetup

        try {
            // If we are a reference, create a Path from the reference
View Full Code Here

        if (getLocation() == null || getLocation().getFileName() == null) {
            throw new BuildException("Unable to get location of import task");
        }

        Union resourcesToImport = new Union(getProject(), resources);
        Resource fromFileAttribute = getFileAttributeResource();
        if (fromFileAttribute != null) {
            resources.add(fromFileAttribute);
        }
        for (Resource r : resourcesToImport) {
View Full Code Here

        Resource[] rs = selectFileResources(initial);
        Resource[] result =
            ResourceUtils.selectOutOfDateSources(this, rs, mapper,
                                                 getZipScanner());
        if (!doFilesonly) {
            Union u = new Union();
            u.addAll(Arrays.asList(selectDirectoryResources(initial)));
            ResourceCollection rc =
                ResourceUtils.selectSources(this, u, mapper,
                                            getZipScanner(),
                                            MISSING_DIR_PROVIDER);
            if (rc.size() > 0) {
View Full Code Here

TOP

Related Classes of org.apache.tools.ant.types.resources.Union

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.