2 This file is used to nest elements which is meant for include path name
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
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.
15 package org
.tianocore
.framework
.tasks
;
18 import java
.util
.ArrayList
;
19 import java
.util
.List
;
20 import java
.util
.StringTokenizer
;
22 public class IncludePath
implements NestElement
{
24 IncludePath nested element Class
26 -name : name of include path
27 -file : name of file including include path
29 private String path
= "";
31 private List
<String
> nameList
= new ArrayList
<String
>();
34 get class member "file"
36 @returns The File object
38 public File
getFile() {
43 set class member "file"
45 @param file The name of include path
47 public void setFile(File file
) {
52 get class member "file"
54 @returns The name of include path
56 public String
getPath() {
61 get class member "name"
63 @returns The name of include path
65 public String
getName() {
70 set class member "name"
72 @param name The name of include path
74 public void setName(String name
){
75 this.path
= " -I " + name
;
79 set class member "path"
81 @param name name of file including include paths
83 public void setPath(String name
) {
84 this.path
= " -I " + name
;
88 override Object.toString()
90 @returns name of file including include paths
92 public String
toString() {
97 set class member "list"
99 @param fileNameList name list of include paths, sperated by space, tab,
102 public void setList(String fileNameList
) {
103 if (fileNameList
!= null && fileNameList
.length() > 0) {
104 StringTokenizer tokens
= new StringTokenizer(fileNameList
, " \t,;", false);
105 while (tokens
.hasMoreTokens()) {
106 String fileName
= tokens
.nextToken().trim();
107 if (fileName
.length() > 0) {
108 this.nameList
.add(fileName
);
115 get class member "list"
117 @returns The include paths list.
119 public List
<String
> getList() {