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

Java DirSet类代码示例

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

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



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

示例1: Groovydoc

import org.apache.tools.ant.types.DirSet; //导入依赖的package包/类
public Groovydoc() {
    packageNames = new ArrayList<String>();
    excludePackageNames = new ArrayList<String>();
    packageSets = new ArrayList<DirSet>();
    sourceFilesToDoc = new ArrayList<String>();
    privateScope = false;
    protectedScope = false;
    publicScope = false;
    packageScope = false;
    useDefaultExcludes = true;
    includeNoSourcePackages = false;
    author = true;
    processScripts = true;
    includeMainForScripts = true;
    noTimestamp = false;
    noVersionStamp = false;
}
 
开发者ID:apache,项目名称:groovy,代码行数:18,代码来源:Groovydoc.java


示例2: testDependencies

import org.apache.tools.ant.types.DirSet; //导入依赖的package包/类
public void testDependencies() throws Exception {
    CreateDependencies d = new CreateDependencies();
    
    Project prj = new Project();
    DirSet ds = new DirSet();
    File dependencies = new File(nb_all, "dependencies");

    ds.setProject(prj);
    ds.setDir(nb_all);
    prj.addReference("x", ds);
    prj.setProperty("nb_all", nb_all.getAbsolutePath());
    d.setProject(prj);
    d.getProject();
    d.setRefid("x");
    d.setDependencies(dependencies);
    d.execute();

    assertFileContent(dependencies,
                      "This project's dependencies\n" +
                      "\n" +
                      "\n" +
                      "Runtime dependencies:\n" +
                      "=====================\n" +
                      "\n" +
                      "From: XC\n" +
                      "  - XA: XB (XD)\n" +
                      "    License: Test license\n" +
                      "\n");
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:30,代码来源:CreateDependenciesTest.java


示例3: testCompileTimeDependencies

import org.apache.tools.ant.types.DirSet; //导入依赖的package包/类
public void testCompileTimeDependencies() throws Exception {
    CreateDependencies d = new CreateDependencies();
    
    Project prj = new Project();
    DirSet ds = new DirSet();
    File dependencies = new File(nb_all, "dependencies");

    ds.setProject(prj);
    ds.setDir(nb_all);
    prj.addReference("x", ds);
    prj.setProperty("nb_all", nb_all.getAbsolutePath());
    d.setProject(prj);
    d.getProject();
    d.setRefid("x");
    d.setDependencies(dependencies);
    d.setSourceDependencies(true);
    d.execute();

    assertFileContent(dependencies,
                      "This project's dependencies\n" +
                      "\n" +
                      "\n" +
                      "Runtime dependencies:\n" +
                      "=====================\n" +
                      "\n" +
                      "From: XC\n" +
                      "  - XA: XB (XD)\n" +
                      "    License: Test license\n" +
                      "\n" +
                      "\n" +
                      "Compile time dependencies:\n" +
                      "==========================\n" +
                      "\n" +
                      "From: XC2\n" +
                      "  - XA2: XB2 (XD2)\n" +
                      "    License: Test license2\n" +
                      "\n");
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:39,代码来源:CreateDependenciesTest.java


示例4: findBinary2LicenseHeaderMapping

import org.apache.tools.ant.types.DirSet; //导入依赖的package包/类
private Map<String,Map<String,String>> findBinary2LicenseHeaderMapping() throws IOException {
    DirSet sources = getProject().getReference(refid);
    Map<String,Map<String,String>> file2LicenseHeaders = new HashMap<>();
    for (Resource r : sources) {
        processModule(r.getName(), file2LicenseHeaders);
    }
    return file2LicenseHeaders;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:9,代码来源:CreateDependencies.java


示例5: collectDirectories

import org.apache.tools.ant.types.DirSet; //导入依赖的package包/类
/**
 * Returns a list of directories from the DirSets.
 * 
 * @param unmanaged   A receiver for unmanaged directories. Not <code>null</code>.
 * 
 * @return   A list of directories from the DirSets. Not <code>null</code>.
 */
private File[] collectDirectories( List<File> unmanaged ) {
    List<File> result = new ArrayList<File>();
    if( dir != null ) {
        result.add( dir );
    }
    for( DirSet dirset : dirsets ) {
        collect( result, unmanaged, dirset );
    }
    return result.toArray( new File[ result.size() ] );
}
 
开发者ID:subclipse,项目名称:svnant,代码行数:18,代码来源:ResourceSetSvnCommand.java


示例6: collect

import org.apache.tools.ant.types.DirSet; //导入依赖的package包/类
/**
 * Collects all directories from the supplied DirSet.
 * 
 * @param receiver    The Collection to receive the directories (and implied directories). Not <code>null</code>.
 * @param unmanaged   The Collection to receive unmanaged directories. Not <code>null</code>.
 * @param dirset      The DirSet which has to be traversed. Not <code>null</code>.
 */
private void collect( List<File> receiver, List<File> unmanaged, DirSet dirset ) {
    DirectoryScanner scanner = dirset.getDirectoryScanner( getProject() );
    File             dir     = dirset.getDir( getProject() );
    String[]         dirs    = scanner.getIncludedDirectories();
    for( String includeddir : dirs ) {
        File directory = new File( dir, includeddir );
        collectUnmanaged( unmanaged, dir, directory, true );
        receiver.add( directory );
    }
}
 
开发者ID:subclipse,项目名称:svnant,代码行数:18,代码来源:ResourceSetSvnCommand.java


示例7: addSourcePaths

import org.apache.tools.ant.types.DirSet; //导入依赖的package包/类
/**
    * Add the root directories for the given project to the Javadoc 
    * sourcepath.
    */
   protected void addSourcePaths(Javadoc jd, ProjectInfo proj) {
Vector dirSets = proj.getDirsets();
int numDirSets = dirSets.size();
for (int i = 0; i < numDirSets; i++) {
    DirSet dirSet = (DirSet)dirSets.elementAt(i);
    jd.setSourcepath(new Path(project, dirSet.getDir(project).toString()));
}
   }
 
开发者ID:junkdog,项目名称:jdiff-mirror,代码行数:13,代码来源:JDiffAntTask.java


示例8: getPackageList

import org.apache.tools.ant.types.DirSet; //导入依赖的package包/类
/**
    * Return the comma-separated list of packages. The list is
    * generated from Ant DirSet tasks, and includes all directories
    * in a hierarchy, e.g. com, com/acme. com/acme/foo. Duplicates are 
    * ignored.
    */
   protected String getPackageList(ProjectInfo proj) throws BuildException {
String packageList = ""; 
java.lang.StringBuffer sb = new StringBuffer();
Vector dirSets = proj.getDirsets();
int numDirSets = dirSets.size();
boolean addComma = false;
for (int i = 0; i < numDirSets; i++) {
    DirSet dirSet = (DirSet)dirSets.elementAt(i);
    DirectoryScanner dirScanner = dirSet.getDirectoryScanner(project);
    String[] files = dirScanner.getIncludedDirectories();
    for (int j = 0; j < files.length; j++) {
	if (!addComma){
	    addComma = true;
	} else {
	    sb.append(",");
	}
	sb.append(files[j]);
    }
}
packageList = sb.toString();
if (packageList.compareTo("") == 0) {
    throw new BuildException("Error: no packages found to scan");
}
project.log(" Package list: " + packageList, Project.MSG_INFO);

return packageList;
   }
 
开发者ID:junkdog,项目名称:jdiff-mirror,代码行数:34,代码来源:JDiffAntTask.java


示例9: addConfiguredInputHeaders

import org.apache.tools.ant.types.DirSet; //导入依赖的package包/类
/**
 * Adds input header directories.
 *
 * @param headers the input header directories
 */
public void addConfiguredInputHeaders(DirSet headers)
{
	inputHeadersSpecified = true;
	DirectoryScanner scanner = headers.getDirectoryScanner(getProject());
	scanner.scan();
	for (String directory: scanner.getIncludedDirectories())
		this.inputHeaders.add(new File(scanner.getBasedir(), directory));
}
 
开发者ID:k9webprotection,项目名称:jace-oat,代码行数:14,代码来源:GenerateCppProxiesTask.java


示例10: addConfiguredInputSources

import org.apache.tools.ant.types.DirSet; //导入依赖的package包/类
/**
 * Adds input source directories.
 *
 * @param sources the input source directories
 */
public void addConfiguredInputSources(DirSet sources)
{
	inputSourcesSpecified = true;
	DirectoryScanner scanner = sources.getDirectoryScanner(getProject());
	scanner.scan();
	for (String directory: scanner.getIncludedDirectories())
		this.inputSources.add(new File(scanner.getBasedir(), directory));
}
 
开发者ID:k9webprotection,项目名称:jace-oat,代码行数:14,代码来源:GenerateCppProxiesTask.java


示例11: addConfiguredDirSet

import org.apache.tools.ant.types.DirSet; //导入依赖的package包/类
public void addConfiguredDirSet(DirSet dirset) {
	if (this.path == null) {
		this.path = (Path) getProject().createDataType("path");
	}
	this.path.addDirset(dirset);
}
 
开发者ID:cniweb,项目名称:ant-contrib,代码行数:7,代码来源:PathFilterTask.java


示例12: addDirset

import org.apache.tools.ant.types.DirSet; //导入依赖的package包/类
public void addDirset(DirSet dset) throws BuildException {
    toAdd.addDirset(dset);
}
 
开发者ID:apache,项目名称:ant-ivy,代码行数:4,代码来源:AddPathTask.java


示例13: addDirset

import org.apache.tools.ant.types.DirSet; //导入依赖的package包/类
public void addDirset(DirSet dset) throws BuildException {
    path.addDirset(dset);
}
 
开发者ID:apache,项目名称:ant-easyant-core,代码行数:4,代码来源:PathTask.java


示例14: setDirset

import org.apache.tools.ant.types.DirSet; //导入依赖的package包/类
public void setDirset(DirSet value) {
    dirsets.add(value);
}
 
开发者ID:junkdog,项目名称:jdiff-mirror,代码行数:4,代码来源:JDiffAntTask.java


示例15: addDirset

import org.apache.tools.ant.types.DirSet; //导入依赖的package包/类
public void addDirset(DirSet dir) {
	dirsets.add(dir);
}
 
开发者ID:kwhat,项目名称:jnitasks,代码行数:4,代码来源:PkgConfigTask.java


示例16: getFilenames

import org.apache.tools.ant.types.DirSet; //导入依赖的package包/类
/**
 * Obtain a list of files in the fileset.
 *
 * @return Vector list of file names
 */
private Vector<String> getFilenames(AbstractFileSet fileset) throws IOException {
    Vector<String> files = new Vector<String>();

    DirectoryScanner scanner = fileset.getDirectoryScanner(getProject());
    File basedir = scanner.getBasedir();
    String dirname = basedir.getAbsolutePath();

    // Iterate through each item in the fileset
    String[] filelist = null;
    if (fileset instanceof FileSet) {
        filelist = scanner.getIncludedFiles();
    } else if (fileset instanceof DirSet) {
        filelist = scanner.getIncludedDirectories();
    } else {
        System.out.println("Unable to determine the type of fileset: " + dirname);
        return files;
    }

    for (int idx = 0; idx < filelist.length; idx++) {
        String filename = filelist[idx];

        // Make the file path relative to the fileset directory if necessary 
        if ((filename != null) && (dirname != null) && (dirname.length() > 0)) {
            if (!useAbsolutePath && filename.startsWith(dirname)) {
                // Remove the directory prefix
                filename = filename.substring(dirname.length());
            } else if (useAbsolutePath && !filename.startsWith(dirname)) {
                // Append the directory prefix
                filename = dirname + File.separator + filename;
            }
        }

        // Add the filename to the list
        if (filename != null) {
            //System.out.println(filename);
            files.add(filename);
        }
    }

    return files;
}
 
开发者ID:ModelN,项目名称:build-management,代码行数:47,代码来源:CreateConfig.java


示例17: ResourceSetSvnCommand

import org.apache.tools.ant.types.DirSet; //导入依赖的package包/类
/**
 * Initialises this base command with the supplied defaults.
 * 
 * @param defrecurse   <code>true</code> <=> The default value for the recurse flag.
 * @param filedirs     <code>true</code> <=> Include directories implied by FileSet.
 * @param scan         <code>true</code> <=> Scan unmanaged resources.
 * @param unmanaged    Specifies the way unmanaged resources will be handled. If 
 *                     <code>null</code> a directory is considered to be unmanaged when it's 
 *                     not part of the repository. If not <code>null</code> a resource is 
 *                     considered unmanaged when it's part of the repository and has the 
 *                     supplied status. 
 */
ResourceSetSvnCommand( boolean defrecurse, boolean filedirs, boolean scan, SVNStatusKind unmanaged ) {
    recurse         = defrecurse;
    incfiledirs     = filedirs;
    unmanageddirs   = unmanaged;
    scanunmanaged   = scan;
    dir             = null;
    file            = null;
    filesets        = new ArrayList<FileSet>();
    dirsets         = new ArrayList<DirSet>();
}
 
开发者ID:subclipse,项目名称:svnant,代码行数:23,代码来源:ResourceSetSvnCommand.java


示例18: addConfiguredClusters

import org.apache.tools.ant.types.DirSet; //导入依赖的package包/类
/**
 * Set of cluster directories to scan.
 * Any dir lacking an update_tracking subdir is automatically ignored.
 */
public void addConfiguredClusters(DirSet clusters) {
    this.clusters = clusters;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:8,代码来源:DeleteUnreferencedClusterFiles.java


示例19: addDirset

import org.apache.tools.ant.types.DirSet; //导入依赖的package包/类
/**
 * Adds a set of directories to the list.
 * 
 * @param set   A set of directories that have to be added. Not <code>null</code>.
 */
public void addDirset( DirSet set ) {
    dirsets.add( set );
}
 
开发者ID:subclipse,项目名称:svnant,代码行数:9,代码来源:ResourceSetSvnCommand.java


示例20: add

import org.apache.tools.ant.types.DirSet; //导入依赖的package包/类
/**
 * Add a dirset to be iterated over.
 *
 * @param dirset
 *            a <code>DirSet</code> value
 */
public void add(DirSet dirset) {
	getOrCreatePath().addDirset(dirset);
}
 
开发者ID:cniweb,项目名称:ant-contrib,代码行数:10,代码来源:ForTask.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Java RemoteAddrValve类代码示例发布时间:2022-05-22
下一篇:
Java TouchEvent类代码示例发布时间: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