summaryrefslogtreecommitdiff
path: root/Tools/Java/Source/GenBuild/org/tianocore/build/global/DpFile.java
diff options
context:
space:
mode:
authorlhauch <lhauch@6f19259b-4bc3-4df7-8a09-765794883524>2008-12-31 16:26:40 +0000
committerlhauch <lhauch@6f19259b-4bc3-4df7-8a09-765794883524>2008-12-31 16:26:40 +0000
commit808def96aa4589fba9c2d0ea55837754a3b7a4f7 (patch)
tree0ea221c59abb2474c694e7ab5bd61006be77e47e /Tools/Java/Source/GenBuild/org/tianocore/build/global/DpFile.java
parent9216450d1143056a50a5f916984a2d7faf590488 (diff)
downloadedk2-platforms-808def96aa4589fba9c2d0ea55837754a3b7a4f7.tar.xz
Retiring the ANT/JAVA build and removing the older EDK II packages that required ANT/JAVA.
Last Ant/Java build was r7166 Developers requiring the Java/Ant packages should checkout the branch from: https://edk2.tianocore.org/svn/edk2/branches/AntJava git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7168 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Tools/Java/Source/GenBuild/org/tianocore/build/global/DpFile.java')
-rw-r--r--Tools/Java/Source/GenBuild/org/tianocore/build/global/DpFile.java130
1 files changed, 0 insertions, 130 deletions
diff --git a/Tools/Java/Source/GenBuild/org/tianocore/build/global/DpFile.java b/Tools/Java/Source/GenBuild/org/tianocore/build/global/DpFile.java
deleted file mode 100644
index af6590f5b6..0000000000
--- a/Tools/Java/Source/GenBuild/org/tianocore/build/global/DpFile.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/** @file
-This file is used to define class which represents dependency file in ANT task
-
-Copyright (c) 2006, Intel Corporation
-All rights reserved. This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution. The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-**/
-package org.tianocore.build.global;
-
-import org.apache.tools.ant.types.DataType;
-import org.apache.tools.ant.types.Path;
-import org.apache.tools.ant.BuildException;
-
-import java.io.File;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.LineNumberReader;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-/**
- DpFile is a ANT DataType which can be used to specify dependency files from
- a file list file, from file list string separated by space, comma or semi-comma,
- or from file name with absolute path
- **/
-public class DpFile extends DataType {
- ///
- /// keep the list of files path
- ///
- private List<String> nameList = new ArrayList<String>();
-
- /**
- Empty constructor just in case
- **/
- public DpFile() {
- }
-
- /**
- Empty execute method of ANT task, just in case
- **/
- public void execute() {
- }
-
- /**
- Standard set method of ANT task/datatype, for ListFile attribute. It simply
- fetch one file path a line from specified list file, and put them in nameList
-
- @param fileListFile file which contains a file list, one file a line,
- with full path
- **/
- public void setListFile(String fileListFile) {
- File file = new File(fileListFile);
- if (!file.exists()) {
- return;
- }
-
- try {
- FileReader fileReader = new FileReader(file);
- LineNumberReader lineReader = new LineNumberReader(fileReader);
-
- String filePath = null;
- while ((filePath = lineReader.readLine()) != null) {
- filePath = filePath.trim();
- if (filePath.length() == 0) {
- continue;
- }
- this.nameList.add(filePath);
- }
-
- lineReader.close();
- fileReader.close();
- } catch (IOException e) {
- throw new BuildException(e.getMessage());
- }
- }
-
- /**
- Standard set method of ANT task/datatype, for List attribute.
-
- @param fileList string with file pathes separated by space, comma,
- or semi-comma
- **/
- public void setList(String fileList) {
- //
- // space, comma or semi-comma separated files list
- //
- Pattern pattern = Pattern.compile("([^ ,;\n\r]++)[ ,;\n\r]*+");
- Matcher matcher = pattern.matcher(fileList);
-
- while (matcher.find()) {
- //
- // keep each file name before " ,;\n\r"
- //
- String filePath = fileList.substring(matcher.start(1), matcher.end(1)).trim();
- if (filePath.length() == 0) {
- continue;
- }
- nameList.add(Path.translateFile(filePath));
- }
-
- }
-
- /**
- Standard set method of ANT task/datatype, for Name attribute.
-
- @param fileName string of a file full path
- **/
- public void setName(String fileName) {
- this.nameList.add(fileName);
- }
-
- /**
- Fetch the file name list.
-
- @returns A string list which contains file names specified to check dependnecy
- **/
- public List<String> getList() {
- return this.nameList;
- }
-}
-
-