当前位置: 首页>>代码示例>>Java>>正文


Java FileList类代码示例

本文整理汇总了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);
			}
		}
	}
 
开发者ID:tofi86,项目名称:Jarbundler,代码行数:17,代码来源:JarBundler.java

示例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()]);
}
 
开发者ID:andyjko,项目名称:feedlack,代码行数:13,代码来源:CompileTask.java

示例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()]);
}
 
开发者ID:andyjko,项目名称:feedlack,代码行数:10,代码来源:CompileTask.java

示例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;
}
 
开发者ID:andyjko,项目名称:feedlack,代码行数:15,代码来源:CompileTask.java

示例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);
			}
		}
	}
 
开发者ID:UltraMixer,项目名称:JarBundler,代码行数:28,代码来源:JarBundler.java

示例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);
		}
	}
}
 
开发者ID:UltraMixer,项目名称:JarBundler,代码行数:16,代码来源:JarBundler.java

示例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);
			}
		}
	}
}
 
开发者ID:UltraMixer,项目名称:JarBundler,代码行数:35,代码来源:JarBundler.java

示例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;
}
 
开发者ID:ehsan,项目名称:js-symbolic-executor,代码行数:16,代码来源:CompileTask.java

示例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;
}
 
开发者ID:mar9000,项目名称:plantuml,代码行数:15,代码来源:PlantUmlTask.java

示例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;
}
 
开发者ID:SpoonLabs,项目名称:astor,代码行数:13,代码来源:CompileTask.java

示例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;
}
 
开发者ID:SpoonLabs,项目名称:astor,代码行数:16,代码来源:CompileTask.java

示例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;
}
 
开发者ID:google,项目名称:closure-compiler,代码行数:11,代码来源:CompileTask.java

示例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);
				}
			}
		}
	}
 
开发者ID:tofi86,项目名称:Jarbundler,代码行数:36,代码来源:JarBundler.java

示例14: addExterns

import org.apache.tools.ant.types.FileList; //导入依赖的package包/类
/**
 * Sets the externs file.
 */
public void addExterns(FileList list) {
  this.externFileLists.add(list);
}
 
开发者ID:andyjko,项目名称:feedlack,代码行数:7,代码来源:CompileTask.java

示例15: addSources

import org.apache.tools.ant.types.FileList; //导入依赖的package包/类
/**
 * Sets the source files.
 */
public void addSources(FileList list) {
  this.sourceFileLists.add(list);
}
 
开发者ID:andyjko,项目名称:feedlack,代码行数:7,代码来源:CompileTask.java


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