• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java FileSelector类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.apache.tools.ant.types.selectors.FileSelector的典型用法代码示例。如果您正苦于以下问题:Java FileSelector类的具体用法?Java FileSelector怎么用?Java FileSelector使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



FileSelector类属于org.apache.tools.ant.types.selectors包,在下文中一共展示了FileSelector类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: removeFileContaining

import org.apache.tools.ant.types.selectors.FileSelector; //导入依赖的package包/类
private void removeFileContaining(String content) {
	DirectoryScanner ds = new DirectoryScanner();
	String[] includes = {"**/*.process"};
	ds.setIncludes(includes);
	ds.setBasedir(testSrcDirectory);
	//ds.setCaseSensitive(true);

	ContainsSelector contentToRemove = new ContainsSelector();
	contentToRemove.setText(content);

	FileSelector[] selectors = {contentToRemove};
	ds.setSelectors(selectors);
	ds.scan();

	String[] files = ds.getIncludedFiles();
	for (int i = 0; i < files.length; i++) {
		String file = testSrcDirectory + File.separator + files[i];
		getLog().debug("Deleting file with starter : '" + file + "'");
		getLog().info("Deleting file with starter : '" + file + "'");
		FileUtils.deleteQuietly(new File(file));
	}

}
 
开发者ID:fastconnect,项目名称:tibco-fcunit,代码行数:24,代码来源:PrepareTestMojo.java


示例2: toFileSet

import org.apache.tools.ant.types.selectors.FileSelector; //导入依赖的package包/类
private FileSet toFileSet(boolean withPatterns) {
    FileSet fs = new FileSet();
    fs.setCaseSensitive(isCaseSensitive());
    fs.setFollowSymlinks(isFollowSymlinks());
    fs.setMaxLevelsOfSymlinks(getMaxLevelsOfSymlinks());
    fs.setProject(getProject());

    if (withPatterns) {
        PatternSet ps = mergePatterns(getProject());
        fs.appendIncludes(ps.getIncludePatterns(getProject()));
        fs.appendExcludes(ps.getExcludePatterns(getProject()));
        for (FileSelector sel : getSelectors(getProject())) {
            fs.appendSelector(sel);
        }
        fs.setDefaultexcludes(getDefaultexcludes());
    }
    return fs;
}
 
开发者ID:apache,项目名称:ant,代码行数:19,代码来源:Sync.java


示例3: appendSelector

import org.apache.tools.ant.types.selectors.FileSelector; //导入依赖的package包/类
/**
 * Add a new selector into this container.
 *
 * @param selector the new <code>FileSelector</code> to add.
 */
@Override
public synchronized void appendSelector(FileSelector selector) {
    if (isReference()) {
        throw noChildrenAllowed();
    }
    super.appendSelector(selector);
    ds = null;
}
 
开发者ID:apache,项目名称:ant,代码行数:14,代码来源:Files.java


示例4: getSelectors

import org.apache.tools.ant.types.selectors.FileSelector; //导入依赖的package包/类
/**
 * Returns the set of selectors as an array.
 * @param p the current project
 * @return a <code>FileSelector[]</code> of the selectors in this container.
 */
@Override
public synchronized FileSelector[] getSelectors(Project p) {
    if (isReference()) {
        return getRef(getProject()).getSelectors(p);
    }
    dieOnCircularReference(p);
    return selectors.toArray(new FileSelector[selectors.size()]);
}
 
开发者ID:apache,项目名称:ant,代码行数:14,代码来源:AbstractFileSet.java


示例5: selectorElements

import org.apache.tools.ant.types.selectors.FileSelector; //导入依赖的package包/类
/**
 * Returns an enumerator for accessing the set of selectors.
 *
 * @return an <code>Enumeration</code> of selectors.
 */
@Override
public synchronized Enumeration<FileSelector> selectorElements() {
    if (isReference()) {
        return getRef(getProject()).selectorElements();
    }
    dieOnCircularReference();
    return Collections.enumeration(selectors);
}
 
开发者ID:apache,项目名称:ant,代码行数:14,代码来源:AbstractFileSet.java


示例6: appendSelector

import org.apache.tools.ant.types.selectors.FileSelector; //导入依赖的package包/类
/**
 * Add a new selector into this container.
 *
 * @param selector the new <code>FileSelector</code> to add.
 */
@Override
public synchronized void appendSelector(FileSelector selector) {
    if (isReference()) {
        throw noChildrenAllowed();
    }
    selectors.add(selector);
    directoryScanner = null;
    setChecked(false);
}
 
开发者ID:apache,项目名称:ant,代码行数:15,代码来源:AbstractFileSet.java


示例7: eval

import org.apache.tools.ant.types.selectors.FileSelector; //导入依赖的package包/类
/**
 * Evaluate the selector with the file.
 * @return true if the file is selected by the embedded selector.
 */
public boolean eval() {
    if (file == null) {
        throw new BuildException("file attribute not set");
    }
    validate();
    File myBaseDir = baseDir;
    if (myBaseDir == null) {
        myBaseDir = getProject().getBaseDir();
    }

    FileSelector f = getSelectors(getProject())[0];
    return f.isSelected(
        myBaseDir, FILE_UTILS.removeLeadingPath(myBaseDir, file), file);
}
 
开发者ID:apache,项目名称:ant,代码行数:19,代码来源:IsFileSelected.java


示例8: selectorElements

import org.apache.tools.ant.types.selectors.FileSelector; //导入依赖的package包/类
public Enumeration<FileSelector> selectorElements() {
    return selectors.selectorElements();
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:4,代码来源:PathFileSet.java


示例9: getSelectors

import org.apache.tools.ant.types.selectors.FileSelector; //导入依赖的package包/类
public FileSelector[] getSelectors(Project p) {
    return selectors.getSelectors(p);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:4,代码来源:PathFileSet.java


示例10: appendSelector

import org.apache.tools.ant.types.selectors.FileSelector; //导入依赖的package包/类
public void appendSelector(FileSelector selector) {
    selectors.appendSelector(selector);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:4,代码来源:PathFileSet.java


示例11: add

import org.apache.tools.ant.types.selectors.FileSelector; //导入依赖的package包/类
public void add(FileSelector selector) {
    selectors.add(selector);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:4,代码来源:PathFileSet.java


示例12: add

import org.apache.tools.ant.types.selectors.FileSelector; //导入依赖的package包/类
@Override public void add(FileSelector selector) {
  usedMatchingTask = true;
  super.add(selector);
}
 
开发者ID:spurious,项目名称:kawa-mirror,代码行数:5,代码来源:Kawac.java


示例13: setSelectors

import org.apache.tools.ant.types.selectors.FileSelector; //导入依赖的package包/类
/**
 * Sets the selectors that will select the filelist.
 *
 * @param selectors specifies the selectors to be invoked on a scan
 */
public void setSelectors( FileSelector[] selectors ) {
    this.selectors = selectors;
}
 
开发者ID:subclipse,项目名称:svnant,代码行数:9,代码来源:SvnDirScanner.java


示例14: setSelectors

import org.apache.tools.ant.types.selectors.FileSelector; //导入依赖的package包/类
/**
 * Set the selectors that will select the filelist.
 *
 * @param selectors specifies the selectors to be invoked on a scan.
 */
@Override
public synchronized void setSelectors(final FileSelector[] selectors) {
    this.selectors = selectors;
}
 
开发者ID:apache,项目名称:ant,代码行数:10,代码来源:DirectoryScanner.java


示例15: add

import org.apache.tools.ant.types.selectors.FileSelector; //导入依赖的package包/类
/**
 * Add an arbitrary selector.
 * @param selector the <code>FileSelector</code> to add.
 * @since Ant 1.6
 */
@Override
public void add(FileSelector selector) {
    appendSelector(selector);
}
 
开发者ID:apache,项目名称:ant,代码行数:10,代码来源:AbstractFileSet.java


示例16: add

import org.apache.tools.ant.types.selectors.FileSelector; //导入依赖的package包/类
/**
 * add an arbitrary selector
 *
 * @param selector the selector to be added
 * @since Ant 1.6
 */
@Override
public void add(FileSelector selector) {
    usedMatchingTask = true;
    super.add(selector);
}
 
开发者ID:apache,项目名称:ant,代码行数:12,代码来源:Delete.java


示例17: getSelectors

import org.apache.tools.ant.types.selectors.FileSelector; //导入依赖的package包/类
/**
 * Returns the set of selectors as an array.
 * @param p the current project
 * @return an array of selectors in this container
 */
@Override
public FileSelector[] getSelectors(Project p) {
    return fileset.getSelectors(p);
}
 
开发者ID:apache,项目名称:ant,代码行数:10,代码来源:MatchingTask.java


示例18: selectorElements

import org.apache.tools.ant.types.selectors.FileSelector; //导入依赖的package包/类
/**
 * Returns an enumerator for accessing the set of selectors.
 *
 * @return an enumerator that goes through each of the selectors
 */
@Override
public Enumeration<FileSelector> selectorElements() {
    return fileset.selectorElements();
}
 
开发者ID:apache,项目名称:ant,代码行数:10,代码来源:MatchingTask.java


示例19: appendSelector

import org.apache.tools.ant.types.selectors.FileSelector; //导入依赖的package包/类
/**
 * Add a new selector into this container.
 *
 * @param selector the new selector to add
 */
@Override
public void appendSelector(FileSelector selector) {
    fileset.appendSelector(selector);
}
 
开发者ID:apache,项目名称:ant,代码行数:10,代码来源:MatchingTask.java


示例20: add

import org.apache.tools.ant.types.selectors.FileSelector; //导入依赖的package包/类
/**
 * add an arbitrary selector
 * @param selector the selector to add
 * @since Ant 1.6
 */
@Override
public void add(FileSelector selector) {
    fileset.add(selector);
}
 
开发者ID:apache,项目名称:ant,代码行数:10,代码来源:MatchingTask.java



注:本文中的org.apache.tools.ant.types.selectors.FileSelector类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java BrowserInformationControl类代码示例发布时间:2022-05-22
下一篇:
Java EthernetPacket类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap