本文整理汇总了Java中org.apache.tools.ant.types.DirSet类的典型用法代码示例。如果您正苦于以下问题:Java DirSet类的具体用法?Java DirSet怎么用?Java DirSet使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DirSet类属于org.apache.tools.ant.types包,在下文中一共展示了DirSet类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例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");
}
示例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");
}
示例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;
}
示例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() ] );
}
示例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 );
}
}
示例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()));
}
}
示例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;
}
示例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));
}
示例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));
}
示例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);
}
示例12: addDirset
import org.apache.tools.ant.types.DirSet; //导入依赖的package包/类
public void addDirset(DirSet dset) throws BuildException {
toAdd.addDirset(dset);
}
示例13: addDirset
import org.apache.tools.ant.types.DirSet; //导入依赖的package包/类
public void addDirset(DirSet dset) throws BuildException {
path.addDirset(dset);
}
示例14: setDirset
import org.apache.tools.ant.types.DirSet; //导入依赖的package包/类
public void setDirset(DirSet value) {
dirsets.add(value);
}
示例15: addDirset
import org.apache.tools.ant.types.DirSet; //导入依赖的package包/类
public void addDirset(DirSet dir) {
dirsets.add(dir);
}