]> git.proxmox.com Git - mirror_edk2.git/blob - Tools/Source/FrameworkTasks/org/tianocore/framework/tasks/SkipExt.java
d766ed2c58fc9449a53058cb90cc0cfecee40b9b
[mirror_edk2.git] / Tools / Source / FrameworkTasks / org / tianocore / framework / tasks / SkipExt.java
1 /** @file
2 This file is to define nested element which is meant for specifying skipped file list
3
4 Copyright (c) 2006, Intel Corporation
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13 **/
14 package org.tianocore.framework.tasks;
15
16 import java.io.File;
17 import java.util.ArrayList;
18 import java.util.List;
19 import java.util.StringTokenizer;
20
21 /**
22 SkipExt nested element Class
23 class member
24 -name : extension name of skiped file
25 -file : name of file including ext
26 **/
27 public class SkipExt implements NestElement {
28 private String name = "";
29 private File file;
30 private List<String> nameList = new ArrayList<String>();
31
32 /**
33 get class member "name"
34 @returns name parameter
35 **/
36 public String getName() {
37 return this.name;
38 }
39 /**
40 set class member "name"
41 @param name extension name of skiped file
42 **/
43 public void setName(String name) {
44 this.name = " -skipext " + name;
45 }
46
47 public String toString() {
48 return getName();
49 }
50
51 /**
52 get class member "file"
53 @returns file parameter
54 **/
55 public File getFile() {
56 return this.file;
57 }
58 /**
59 set class member "file"
60 @param name of file including ext
61 **/
62 public void setFile(File file) {
63 this.file = file;
64 }
65
66 public void setList(String fileNameList) {
67 if (fileNameList != null && fileNameList.length() > 0) {
68 StringTokenizer tokens = new StringTokenizer(fileNameList, " \t,;", false);
69 while (tokens.hasMoreTokens()) {
70 String fileName = tokens.nextToken().trim();
71 if (fileName.length() > 0) {
72 this.nameList.add(fileName);
73 }
74 }
75 }
76 }
77
78 public List<String> getList() {
79 return nameList;
80 }
81
82 }
83