congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
ResourceCollection.isFilesystemOnly
Code IndexAdd Tabnine to your IDE (free)

How to use
isFilesystemOnly
method
in
org.apache.tools.ant.types.ResourceCollection

Best Java code snippets using org.apache.tools.ant.types.ResourceCollection.isFilesystemOnly (Showing top 20 results out of 315)

origin: org.apache.ant/ant

/**
 * whether the given resource collection is a (subclass of)
 * FileSet that only contains file system resources.
 * @param rc the resource collection to check.
 * @return true if the collection is a fileset.
 * @since Ant 1.7
 */
protected static boolean isFileFileSet(final ResourceCollection rc) {
  return rc instanceof FileSet && rc.isFilesystemOnly();
}
origin: org.testng/testng

private ResourceCollection createResourceCollection(Reference ref) {
 Object o = ref.getReferencedObject();
 if (!(o instanceof ResourceCollection)) {
   throw new BuildException("Only File based ResourceCollections are supported.");
 }
 ResourceCollection rc = (ResourceCollection) o;
 if (!rc.isFilesystemOnly()) {
   throw new BuildException("Only ResourceCollections from local file system are supported.");
 }
 return rc;
}
origin: org.apache.ant/ant

/**
 * Sets the archive that holds this as a single element Resource
 * collection.
 * @param a the archive as a single element Resource collection.
 */
public void addConfigured(ResourceCollection a) {
  super.addConfigured(a);
  if (!a.isFilesystemOnly()) {
    throw new BuildException("only filesystem resources are supported");
  }
}
origin: cbeust/testng

private ResourceCollection createResourceCollection(Reference ref) {
 Object o = ref.getReferencedObject();
 if (!(o instanceof ResourceCollection)) {
  throw new BuildException("Only File based ResourceCollections are supported.");
 }
 ResourceCollection rc = (ResourceCollection) o;
 if (!rc.isFilesystemOnly()) {
  throw new BuildException("Only ResourceCollections from local file system are supported.");
 }
 return rc;
}
origin: org.apache.ant/ant

/**
 * Verify the specified ResourceCollection is filesystem-only.
 * @param rc the ResourceCollection to check.
 * @throws BuildException if <code>rc</code> is not filesystem-only.
 * @return the passed in ResourceCollection.
 */
protected ResourceCollection assertFilesystemOnly(ResourceCollection rc) {
  if (rc != null && !(rc.isFilesystemOnly())) {
    throw new BuildException("%s allows only filesystem resources.",
      getDataTypeName());
  }
  return rc;
}
origin: org.apache.ant/ant

/**
 * Support arbitrary file system based resource collections.
 *
 * @param rc ResourceCollection
 * @since Ant 1.8.0
 */
public void addConfigured(ResourceCollection rc) {
  if (!rc.isFilesystemOnly()) {
    throw new BuildException("only filesystem resources are supported");
  }
  if (resources == null) {
    resources = new Union();
  }
  resources.add(rc);
}
origin: org.apache.ant/ant

/**
 * Support arbitrary file system based resource collections.
 *
 * @param rc ResourceCollection
 * @since Ant 1.8.0
 */
public void addConfigured(ResourceCollection rc) {
  if (!rc.isFilesystemOnly()) {
    throw new BuildException("only filesystem resources are supported");
  }
  if (resources == null) {
    resources = new Union();
  }
  resources.add(rc);
}
origin: org.apache.ant/ant

/**
 * Fulfill the ResourceCollection contract.
 * @return true if all Resources represent files.
 */
@Override
public boolean isFilesystemOnly() {
  if (isReference()) {
    return getRef().isFilesystemOnly();
  }
  validate();
  return getNested().stream()
    .allMatch(ResourceCollection::isFilesystemOnly);
}
origin: org.apache.ant/ant

if (!rc.isFilesystemOnly() && !supportsNonFileResources()) {
  throw new BuildException(
    "Only FileSystem resources are supported.");
origin: org.apache.ant/ant

/**
 * Fulfill the ResourceCollection contract.
 *
 * @return whether this is a filesystem-only resource collection.
 */
@Override
public synchronized boolean isFilesystemOnly() {
  if (isReference()) {
    return getCheckedRef().isFilesystemOnly();
  }
  return cache().isFilesystemOnly();
}
origin: org.apache.ant/ant

  final FileSet fs = (FileSet) rc;
  upToDate = check(fs.getDir(getProject()), getFileNames(fs));
} else if (!rc.isFilesystemOnly() && !supportsNonFileResources()) {
  throw new BuildException("only filesystem resources are supported");
} else if (rc.isFilesystemOnly()) {
  final Set<File> basedirs = new HashSet<>();
  final Map<File, List<String>> basedirToFilesMap = new HashMap<>();
origin: org.apache.ant/ant

/**
 * Fulfill the ResourceCollection contract.
 * @return whether this is a filesystem-only resource collection.
 */
public synchronized boolean isFilesystemOnly() {
  if (isReference()) {
    return ((BaseResourceCollectionContainer) getCheckedRef()).isFilesystemOnly();
  }
  dieOnCircularReference();
  if (rc == null || rc.isFilesystemOnly()) {
    return true;
  }
  /* now check each Resource in case the child only
    lets through files from any children IT may have: */
  for (Resource r : this) {
    if (r.as(FileProvider.class) == null) {
      return false;
    }
  }
  return true;
}
origin: org.apache.ant/ant

    tarFile(f, tOut, name, tfs);
} else if (rc.isFilesystemOnly()) {
  for (final Resource r : rc) {
    final File f = r.as(FileProvider.class).getFile();
origin: org.apache.ant/ant

/**
 * Add the files matched by the nested source files to the Vector
 * as SourceFile instances.
 *
 * @since 1.7
 */
private void addSourceFiles(final List<SourceFile> sf) {
  for (ResourceCollection rc : nestedSourceFiles) {
    if (!rc.isFilesystemOnly()) {
      throw new BuildException(
        "only file system based resources are supported by javadoc");
    }
    if (rc instanceof FileSet) {
      final FileSet fs = (FileSet) rc;
      if (!fs.hasPatterns() && !fs.hasSelectors()) {
        final FileSet fs2 = (FileSet) fs.clone();
        fs2.createInclude().setName("**/*.java");
        if (includeNoSourcePackages) {
          fs2.createInclude().setName("**/package.html");
        }
        rc = fs2;
      }
    }
    for (final Resource r : rc) {
      sf.add(new SourceFile(r.as(FileProvider.class).getFile()));
    }
  }
}
origin: org.apache.ant/ant

if (rc instanceof FileSet && rc.isFilesystemOnly()) {
  final FileSet fs = (FileSet) rc;
  DirectoryScanner ds;
} else { // not a fileset or contains non-file resources
  if (!rc.isFilesystemOnly() && !supportsNonFileResources()) {
    throw new BuildException(
          "Only FileSystem resources are supported.");
origin: org.apache.ant/ant

/**
 * Adds a collection of filesystem resources to copy.
 * @param rc a resource collection
 * @since Ant 1.7
 */
public void add(ResourceCollection rc) {
  if (rc instanceof FileSet && rc.isFilesystemOnly()) {
    // receives special treatment in copy that this task relies on
    myCopy.add(rc);
  } else {
    if (resources == null) {
      Restrict r = new Restrict();
      r.add(new Exists());
      resources = new Resources();
      r.add(resources);
      myCopy.add(r);
    }
    resources.add(rc);
  }
}
origin: de.unkrig/antology

@Override public boolean
isFilesystemOnly() {
  final ResourceCollection delegate = this.delegate;
  assert delegate != null;
  return delegate.isFilesystemOnly();
}
origin: org.apache.ant/ant-jsch

private List<Directory> createDirectoryCollection(final ResourceCollection rc) {
  if (!rc.isFilesystemOnly()) {
    throw new BuildException("Only FileSystem resources are supported.");
origin: org.apache.ant/ant-jsch

final List<Directory> list = new ArrayList<>(rcs.size());
for (ResourceCollection rc : rcs) {
  if (rc instanceof FileSet && rc.isFilesystemOnly()) {
    FileSet fs = (FileSet) rc;
    final Directory d = createDirectory(fs);
origin: phax/ph-schematron

for (final ResourceCollection aResCollection : aResCollections)
 if (!aResCollection.isFilesystemOnly ())
  _error ("Only FileSystem resources are supported.");
 else
org.apache.tools.ant.typesResourceCollectionisFilesystemOnly

Javadoc

Indicate whether this ResourceCollection is composed entirely of Resources accessible via local filesystem conventions. If true, all resources returned from this collection should respond with a org.apache.tools.ant.types.resources.FileProvider when asked via Resource#as.

Popular methods of ResourceCollection

  • iterator
  • size
    Learn the number of contained Resources.
  • forEach
  • isEmpty
    Learn whether this ResourceCollection is empty.
  • stream
    Return a Stream over this ResourceCollection.

Popular in Java

  • Start an intent from android
  • onRequestPermissionsResult (Fragment)
  • getContentResolver (Context)
  • runOnUiThread (Activity)
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now