本文整理汇总了Java中org.apache.tools.ant.types.FileList类的典型用法代码示例。如果您正苦于以下问题:Java FileList类的具体用法?Java FileList怎么用?Java FileList使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
FileList类属于org.apache.tools.ant.types包,在下文中一共展示了FileList类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: processExtraClassPathFileLists
import org.apache.tools.ant.types.FileList; //导入依赖的package包/类
private void processExtraClassPathFileLists() throws BuildException {
for (Iterator jarIter = mExtraClassPathFileLists.iterator(); jarIter
.hasNext();) {
FileList fl = (FileList) jarIter.next();
Project p = fl.getProject();
File srcDir = fl.getDir(p);
String[] files = fl.getFiles(p);
for (int i = 0; i < files.length; i++) {
File f = new File(srcDir, files[i]);
String path = f.getPath().replace(File.separatorChar, '/');
bundleProperties.addToExtraClassPath(path);
}
}
}
示例2: findExternFiles
import org.apache.tools.ant.types.FileList; //导入依赖的package包/类
private JSSourceFile[] findExternFiles() {
List<JSSourceFile> files = Lists.newLinkedList();
if (!this.customExternsOnly) {
files.addAll(getDefaultExterns());
}
for (FileList list : this.externFileLists) {
files.addAll(findJavaScriptFiles(list));
}
return files.toArray(new JSSourceFile[files.size()]);
}
示例3: findSourceFiles
import org.apache.tools.ant.types.FileList; //导入依赖的package包/类
private JSSourceFile[] findSourceFiles() {
List<JSSourceFile> files = Lists.newLinkedList();
for (FileList list : this.sourceFileLists) {
files.addAll(findJavaScriptFiles(list));
}
return files.toArray(new JSSourceFile[files.size()]);
}
示例4: findJavaScriptFiles
import org.apache.tools.ant.types.FileList; //导入依赖的package包/类
/**
* Translates an Ant file list into the file format that the compiler
* expects.
*/
private List<JSSourceFile> findJavaScriptFiles(FileList fileList) {
List<JSSourceFile> files = Lists.newLinkedList();
File baseDir = fileList.getDir(getProject());
for (String included : fileList.getFiles(getProject())) {
files.add(JSSourceFile.fromFile(new File(baseDir, included)));
}
return files;
}
示例5: processJarFileLists
import org.apache.tools.ant.types.FileList; //导入依赖的package包/类
private void processJarFileLists() throws BuildException {
for (Iterator jarIter = mJarFileLists.iterator(); jarIter.hasNext();) {
FileList fl = (FileList) jarIter.next();
Project p = fl.getProject();
File srcDir = fl.getDir(p);
String[] files = fl.getFiles(p);
try {
for (int i = 0; i < files.length; i++) {
String fileName = files[i];
File src = new File(srcDir, fileName);
File dest = new File(mJavaDir, fileName);
if (mVerbose)
log("Copying JAR file to \"" + bundlePath(dest) + "\"");
mFileUtils.copyFile(src, dest);
bundleProperties.addToClassPath(fileName);
}
} catch (IOException ex) {
throw new BuildException("Cannot copy jar file: " + ex);
}
}
}
示例6: processExtraClassPathFileLists
import org.apache.tools.ant.types.FileList; //导入依赖的package包/类
private void processExtraClassPathFileLists() throws BuildException {
for (Iterator jarIter = mExtraClassPathFileLists.iterator(); jarIter
.hasNext();) {
FileList fl = (FileList) jarIter.next();
Project p = fl.getProject();
File srcDir = fl.getDir(p);
String[] files = fl.getFiles(p);
for (int i = 0; i < files.length; i++) {
File f = new File(srcDir, files[i]);
String path = f.getPath().replace(File.separatorChar, '/');
bundleProperties.addToExtraClassPath(path);
}
}
}
示例7: processCopyingFileLists
import org.apache.tools.ant.types.FileList; //导入依赖的package包/类
private void processCopyingFileLists(List fileLists, File targetDir, boolean setExec) throws BuildException {
for (Iterator execIter = fileLists.iterator(); execIter.hasNext();) {
FileList fl = (FileList) execIter.next();
Project p = fl.getProject();
File srcDir = fl.getDir(p);
String[] files = fl.getFiles(p);
if (files.length == 0) {
// this is probably an error -- warn about it
System.err.println("WARNING: filelist for copying from directory "
+ srcDir + ": no files found");
} else {
try {
for (int i = 0; i < files.length; i++) {
String fileName = files[i];
File src = new File(srcDir, fileName);
File dest = new File(targetDir, fileName);
if (mVerbose)
log("Copying "
+ (setExec ? "exec" : "resource")
+ " file to \"" + bundlePath(dest) +"\"");
mFileUtils.copyFile(src, dest);
if (setExec)
setExecutable(dest);
}
} catch (IOException ex) {
throw new BuildException("Cannot copy jar file: " + ex);
}
}
}
}
示例8: findJavaScriptFiles
import org.apache.tools.ant.types.FileList; //导入依赖的package包/类
/**
* Translates an Ant file list into the file format that the compiler
* expects.
*/
private List<JSSourceFile> findJavaScriptFiles(FileList fileList) {
List<JSSourceFile> files = Lists.newLinkedList();
File baseDir = fileList.getDir(getProject());
for (String included : fileList.getFiles(getProject())) {
files.add(JSSourceFile.fromFile(new File(baseDir, included),
Charset.forName(encoding)));
}
return files;
}
示例9: manageFileList
import org.apache.tools.ant.types.FileList; //导入依赖的package包/类
private File manageFileList(FileList fl) throws IOException, InterruptedException {
final File fromDir = fl.getDir(getProject());
final String[] srcFiles = fl.getFiles(getProject());
for (String src : srcFiles) {
final File f = new File(fromDir, src);
final boolean error = processingSingleFile(f);
if (error) {
return f;
}
}
return null;
}
示例10: findExternFiles
import org.apache.tools.ant.types.FileList; //导入依赖的package包/类
private List<SourceFile> findExternFiles() {
List<SourceFile> files = Lists.newLinkedList();
if (!this.customExternsOnly) {
files.addAll(getDefaultExterns());
}
for (FileList list : this.externFileLists) {
files.addAll(findJavaScriptFiles(list));
}
return files;
}
示例11: findJavaScriptFiles
import org.apache.tools.ant.types.FileList; //导入依赖的package包/类
/**
* Translates an Ant file list into the file format that the compiler
* expects.
*/
private List<SourceFile> findJavaScriptFiles(FileList fileList) {
List<SourceFile> files = Lists.newLinkedList();
File baseDir = fileList.getDir(getProject());
for (String included : fileList.getFiles(getProject())) {
files.add(SourceFile.fromFile(new File(baseDir, included),
Charset.forName(encoding)));
}
return files;
}
示例12: findExternFiles
import org.apache.tools.ant.types.FileList; //导入依赖的package包/类
private List<SourceFile> findExternFiles(CompilerOptions options) {
List<SourceFile> files = new ArrayList<>();
files.addAll(getBuiltinExterns(options));
for (FileList list : this.externFileLists) {
files.addAll(findJavaScriptFiles(list));
}
return files;
}
示例13: processCopyingFileLists
import org.apache.tools.ant.types.FileList; //导入依赖的package包/类
private void processCopyingFileLists(List fileLists, File targetDir, boolean setExec) throws BuildException {
for (Iterator execIter = fileLists.iterator(); execIter.hasNext();) {
FileList fl = (FileList) execIter.next();
Project p = fl.getProject();
File srcDir = fl.getDir(p);
String[] files = fl.getFiles(p);
if (files.length == 0) {
// this is probably an error -- warn about it
System.err.println("WARNING: filelist for copying from directory "
+ srcDir + ": no files found");
} else {
try {
for (int i = 0; i < files.length; i++) {
String fileName = files[i];
File src = new File(srcDir, fileName);
File dest = new File(targetDir, fileName);
if (mVerbose)
log("Copying "
+ (setExec ? "exec" : "resource")
+ " file to \"" + bundlePath(dest) +"\"");
mFileUtils.copyFile(src, dest);
if (setExec)
setExecutable(dest);
}
} catch (IOException ex) {
throw new BuildException("Cannot copy jar file: " + ex);
}
}
}
}
示例14: addExterns
import org.apache.tools.ant.types.FileList; //导入依赖的package包/类
/**
* Sets the externs file.
*/
public void addExterns(FileList list) {
this.externFileLists.add(list);
}
示例15: addSources
import org.apache.tools.ant.types.FileList; //导入依赖的package包/类
/**
* Sets the source files.
*/
public void addSources(FileList list) {
this.sourceFileLists.add(list);
}