public ResourceList() { cachedResources.setCache(true); }
public ImportTask() { resources.setCache(true); }
/** * Whether to cache the current path. * @param b boolean * @since Ant 1.8.0 */ public void setCache(boolean b) { checkAttributesAllowed(); cache = b; if (union != null) { union.setCache(b); } }
private ResourceCollection read(Resource r) { try (BufferedReader reader = new BufferedReader(open(r))) { Union streamResources = new Union(); streamResources.setCache(true); reader.lines().map(this::parse).forEach(streamResources::add); return streamResources; } catch (final IOException ioe) { throw new BuildException("Unable to read resource " + r.getName() + ": " + ioe, ioe, getLocation()); } }
/** * Add a nested <code>ResourceCollection</code>. * @param c the ResourceCollection to add. * @since Ant 1.7 */ public void add(ResourceCollection c) { checkChildrenAllowed(); if (c == null) { return; } if (union == null) { union = new Union(); union.setProject(getProject()); union.setCache(cache); } union.add(c); setChecked(false); }