]> git.proxmox.com Git - mirror_edk2.git/blame_incremental - Tools/Source/GenBuild/org/tianocore/build/fpd/FpdParserTask.java
1. Fix EDKT314 Display module source/binary in a radio box
[mirror_edk2.git] / Tools / Source / GenBuild / org / tianocore / build / fpd / FpdParserTask.java
... / ...
CommitLineData
1/** @file\r
2 This file is ANT task FpdParserTask.\r
3\r
4 FpdParserTask is used to parse FPD (Framework Platform Description) and generate\r
5 build.out.xml. It is for Package or Platform build use.\r
6\r
7 Copyright (c) 2006, Intel Corporation\r
8 All rights reserved. This program and the accompanying materials\r
9 are licensed and made available under the terms and conditions of the BSD License\r
10 which accompanies this distribution. The full text of the license may be found at\r
11 http://opensource.org/licenses/bsd-license.php\r
12\r
13 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
14 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
15 **/\r
16package org.tianocore.build.fpd;\r
17\r
18import java.io.BufferedWriter;\r
19import java.io.File;\r
20import java.io.FileWriter;\r
21import java.io.IOException;\r
22import java.util.HashMap;\r
23import java.util.Iterator;\r
24import java.util.LinkedHashMap;\r
25import java.util.LinkedHashSet;\r
26import java.util.Map;\r
27import java.util.Set;\r
28import java.util.Vector;\r
29\r
30import org.apache.tools.ant.BuildException;\r
31import org.apache.tools.ant.Task;\r
32import org.apache.tools.ant.taskdefs.Ant;\r
33import org.apache.tools.ant.taskdefs.Property;\r
34import org.apache.xmlbeans.XmlException;\r
35import org.apache.xmlbeans.XmlObject;\r
36\r
37import org.tianocore.common.definitions.EdkDefinitions;\r
38import org.tianocore.common.exception.EdkException;\r
39import org.tianocore.pcd.action.ActionMessage;\r
40import org.tianocore.build.FrameworkBuildTask;\r
41import org.tianocore.build.global.GlobalData;\r
42import org.tianocore.build.global.OutputManager;\r
43import org.tianocore.build.global.SurfaceAreaQuery;\r
44import org.tianocore.build.id.FpdModuleIdentification;\r
45import org.tianocore.build.id.ModuleIdentification;\r
46import org.tianocore.build.id.PlatformIdentification;\r
47import org.tianocore.build.pcd.action.PlatformPcdPreprocessActionForBuilding;\r
48import org.tianocore.build.toolchain.ToolChainAttribute;\r
49import org.tianocore.build.toolchain.ToolChainElement;\r
50import org.tianocore.build.toolchain.ToolChainMap;\r
51\r
52/**\r
53 <code>FpdParserTask</code> is an ANT task. The main function is parsing Framework\r
54 Platform Descritpion (FPD) XML file and generating its ANT build script for\r
55 corresponding platform.\r
56\r
57 <p>The task sets global properties PLATFORM, PLATFORM_DIR, PLATFORM_RELATIVE_DIR\r
58 and BUILD_DIR. </p>\r
59\r
60 <p>The task generates ${PLATFORM}_build.xml file which will be called by top level\r
61 build.xml. The task also generate Fv.inf files (File is for Tool GenFvImage). </p>\r
62\r
63 <p>FpdParserTask task stores all FPD information to GlobalData. And parse\r
64 tools definition file to set up compiler options for different Target and\r
65 different ToolChainTag. </p>\r
66\r
67 <p>The method parseFpdFile is also prepared for single module build. </p>\r
68\r
69 @since GenBuild 1.0\r
70**/\r
71public class FpdParserTask extends Task {\r
72\r
73 private File fpdFile = null;\r
74\r
75 PlatformIdentification platformId;\r
76\r
77 private String type;\r
78\r
79 ///\r
80 /// Mapping from modules identification to out put file name\r
81 ///\r
82 Map<FpdModuleIdentification, String> outfiles = new LinkedHashMap<FpdModuleIdentification, String>();\r
83\r
84 ///\r
85 /// Mapping from FV name to its modules\r
86 ///\r
87 Map<String, Set<FpdModuleIdentification>> fvs = new HashMap<String, Set<FpdModuleIdentification>>();\r
88\r
89 ///\r
90 /// FpdParserTask can specify some ANT properties.\r
91 ///\r
92 private Vector<Property> properties = new Vector<Property>();\r
93\r
94 SurfaceAreaQuery saq = null;\r
95 \r
96 boolean isUnified = true;\r
97\r
98 /**\r
99 Public construct method. It is necessary for ANT task.\r
100 **/\r
101 public FpdParserTask() {\r
102 }\r
103\r
104 /**\r
105 ANT task's entry method. The main steps is described as following:\r
106\r
107 <ul>\r
108 <li>Initialize global information (Framework DB, SPD files and all MSA files\r
109 listed in SPD). This step will execute only once in whole build process;</li>\r
110 <li>Parse specified FPD file; </li>\r
111 <li>Generate FV.inf files; </li>\r
112 <li>Generate PlatformName_build.xml file for Flatform build; </li>\r
113 <li>Collect PCD information. </li>\r
114 </ul>\r
115\r
116 @throws BuildException\r
117 Surface area is not valid.\r
118 **/\r
119 public void execute() throws BuildException {\r
120 //\r
121 // Parse FPD file\r
122 //\r
123 parseFpdFile();\r
124\r
125 //\r
126 // Prepare BUILD_DIR\r
127 //\r
128 isUnified = OutputManager.getInstance().prepareBuildDir(getProject());\r
129\r
130 String buildDir = getProject().getProperty("BUILD_DIR");\r
131 //\r
132 // For every Target and ToolChain\r
133 //\r
134 String[] targetList = GlobalData.getToolChainInfo().getTargets();\r
135 for (int i = 0; i < targetList.length; i++) {\r
136 String[] toolchainList = GlobalData.getToolChainInfo().getTagnames();\r
137 for(int j = 0; j < toolchainList.length; j++) {\r
138 //\r
139 // Prepare FV_DIR\r
140 //\r
141 String ffsCommonDir = buildDir + File.separatorChar\r
142 + targetList[i] + "_"\r
143 + toolchainList[j];\r
144 File fvDir = new File(ffsCommonDir + File.separatorChar + "FV");\r
145 fvDir.mkdirs();\r
146 getProject().setProperty("FV_DIR", fvDir.getPath().replaceAll("(\\\\)", "/"));\r
147\r
148 //\r
149 // Gen Fv.inf files\r
150 //\r
151 genFvInfFiles(ffsCommonDir);\r
152 }\r
153 }\r
154\r
155 //\r
156 // Gen build.xml\r
157 //\r
158 String platformBuildFile = buildDir + File.separatorChar + platformId.getName() + "_build.xml";\r
159 PlatformBuildFileGenerator fileGenerator = new PlatformBuildFileGenerator(getProject(), outfiles, fvs, isUnified, saq, platformBuildFile);\r
160 fileGenerator.genBuildFile();\r
161\r
162 //\r
163 // Ant call ${PLATFORM}_build.xml\r
164 //\r
165 Ant ant = new Ant();\r
166 ant.setProject(getProject());\r
167 ant.setAntfile(platformBuildFile);\r
168 ant.setTarget(type);\r
169 ant.setInheritAll(true);\r
170 ant.init();\r
171 ant.execute();\r
172 }\r
173\r
174 /**\r
175 Generate Fv.inf files. The Fv.inf file is composed with four\r
176 parts: Options, Attributes, Components and Files. The Fv.inf files\r
177 will be under FV_DIR.\r
178\r
179 @throws BuildException\r
180 File write FV.inf files error.\r
181 **/\r
182 void genFvInfFiles(String ffsCommonDir) throws BuildException {\r
183 String[] validFv = saq.getFpdValidImageNames();\r
184 for (int i = 0; i < validFv.length; i++) {\r
185 //\r
186 // Get all global variables from FPD and set them to properties\r
187 //\r
188 String[][] globalVariables = saq.getFpdGlobalVariable();\r
189 for (int j = 0; j < globalVariables.length; j++) {\r
190 getProject().setProperty(globalVariables[j][0], globalVariables[j][1]);\r
191 }\r
192\r
193 getProject().setProperty("FV_FILENAME", validFv[i]);\r
194\r
195 File fvFile = new File(getProject().replaceProperties( getProject().getProperty("FV_DIR") + File.separatorChar + validFv[i] + ".inf"));\r
196 if (fvFile.exists() && (fvFile.lastModified() >= fpdFile.lastModified())) {\r
197 //\r
198 // don't re-generate FV.inf if fpd has not been changed\r
199 // \r
200 continue;\r
201 }\r
202 fvFile.getParentFile().mkdirs();\r
203\r
204 try {\r
205 FileWriter fw = new FileWriter(fvFile);\r
206 BufferedWriter bw = new BufferedWriter(fw);\r
207\r
208 //\r
209 // Options\r
210 //\r
211 String[][] options = saq.getFpdOptions(validFv[i]);\r
212 if (options.length > 0) {\r
213 bw.write("[options]");\r
214 bw.newLine();\r
215 for (int j = 0; j < options.length; j++) {\r
216 StringBuffer str = new StringBuffer(100);\r
217 str.append(options[j][0]);\r
218 while (str.length() < 40) {\r
219 str.append(' ');\r
220 }\r
221 str.append("= ");\r
222 str.append(options[j][1]);\r
223 bw.write(getProject().replaceProperties(str.toString()));\r
224 bw.newLine();\r
225 }\r
226 bw.newLine();\r
227 }\r
228\r
229 //\r
230 // Attributes;\r
231 //\r
232 String[][] attributes = saq.getFpdAttributes(validFv[i]);\r
233 if (attributes.length > 0) {\r
234 bw.write("[attributes]");\r
235 bw.newLine();\r
236 for (int j = 0; j < attributes.length; j++) {\r
237 StringBuffer str = new StringBuffer(100);\r
238 str.append(attributes[j][0]);\r
239 while (str.length() < 40) {\r
240 str.append(' ');\r
241 }\r
242 str.append("= ");\r
243 str.append(attributes[j][1]);\r
244 bw.write(getProject().replaceProperties(str.toString()));\r
245 bw.newLine();\r
246 }\r
247 bw.newLine();\r
248 }\r
249\r
250 //\r
251 // Components\r
252 //\r
253 String[][] components = saq.getFpdComponents(validFv[i]);\r
254 if (components.length > 0) {\r
255 bw.write("[components]");\r
256 bw.newLine();\r
257 for (int j = 0; j < components.length; j++) {\r
258 StringBuffer str = new StringBuffer(100);\r
259 str.append(components[j][0]);\r
260 while (str.length() < 40) {\r
261 str.append(' ');\r
262 }\r
263 str.append("= ");\r
264 str.append(components[j][1]);\r
265 bw.write(getProject().replaceProperties(str.toString()));\r
266 bw.newLine();\r
267 }\r
268 bw.newLine();\r
269 }\r
270\r
271 //\r
272 // Files\r
273 //\r
274 Set<FpdModuleIdentification> filesSet = fvs.get(validFv[i]);\r
275 if (filesSet != null) {\r
276 FpdModuleIdentification[] files = filesSet.toArray(new FpdModuleIdentification[filesSet.size()]);\r
277 bw.write("[files]");\r
278 bw.newLine();\r
279 for (int j = 0; j < files.length; j++) {\r
280 String str = ffsCommonDir + File.separatorChar + outfiles.get(files[j]);\r
281 bw.write(getProject().replaceProperties("EFI_FILE_NAME = " + str));\r
282 bw.newLine();\r
283 }\r
284 }\r
285 bw.flush();\r
286 bw.close();\r
287 fw.close();\r
288 } catch (IOException ex) {\r
289 BuildException buildException = new BuildException("Generation of the FV file [" + fvFile.getPath() + "] failed!\n" + ex.getMessage());\r
290 buildException.setStackTrace(ex.getStackTrace());\r
291 throw buildException;\r
292 }\r
293 }\r
294 }\r
295 /**\r
296 This method is used for Single Module Build.\r
297\r
298\r
299 @throws BuildException\r
300 FPD file is not valid.\r
301 **/\r
302 public void parseFpdFile(File fpdFile) throws BuildException, EdkException {\r
303 this.fpdFile = fpdFile;\r
304 parseFpdFile();\r
305 \r
306 //\r
307 // Call Platform_build.xml prebuild firstly in stand-alone build\r
308 // Prepare BUILD_DIR\r
309 //\r
310 isUnified = OutputManager.getInstance().prepareBuildDir(getProject());\r
311\r
312 String buildDir = getProject().getProperty("BUILD_DIR");\r
313 //\r
314 // For every Target and ToolChain\r
315 //\r
316 String[] targetList = GlobalData.getToolChainInfo().getTargets();\r
317 for (int i = 0; i < targetList.length; i++) {\r
318 String[] toolchainList = GlobalData.getToolChainInfo().getTagnames();\r
319 for(int j = 0; j < toolchainList.length; j++) {\r
320 //\r
321 // Prepare FV_DIR\r
322 //\r
323 String ffsCommonDir = buildDir + File.separatorChar\r
324 + targetList[i] + "_"\r
325 + toolchainList[j];\r
326 File fvDir = new File(ffsCommonDir + File.separatorChar + "FV");\r
327 fvDir.mkdirs();\r
328 }\r
329 }\r
330\r
331 String platformBuildFile = buildDir + File.separatorChar + platformId.getName() + "_build.xml";\r
332 PlatformBuildFileGenerator fileGenerator = new PlatformBuildFileGenerator(getProject(), outfiles, fvs, isUnified, saq, platformBuildFile);\r
333 fileGenerator.genBuildFile();\r
334 \r
335 Ant ant = new Ant();\r
336 ant.setProject(getProject());\r
337 ant.setAntfile(platformBuildFile);\r
338 ant.setTarget("prebuild");\r
339 ant.setInheritAll(true);\r
340 ant.init();\r
341 ant.execute();\r
342 }\r
343\r
344 /**\r
345 Parse FPD file.\r
346\r
347 @throws BuildException\r
348 FPD file is not valid.\r
349 **/\r
350 void parseFpdFile() throws BuildException {\r
351 try {\r
352 XmlObject doc = XmlObject.Factory.parse(fpdFile);\r
353\r
354 if (!doc.validate()) {\r
355 throw new BuildException("Platform Surface Area file [" + fpdFile.getPath() + "] format is invalid!");\r
356 }\r
357\r
358 Map<String, XmlObject> map = new HashMap<String, XmlObject>();\r
359 map.put("PlatformSurfaceArea", doc);\r
360 saq = new SurfaceAreaQuery(map);\r
361\r
362 //\r
363 // Initialize\r
364 //\r
365 platformId = saq.getFpdHeader();\r
366 platformId.setFpdFile(fpdFile);\r
367 getProject().setProperty("PLATFORM", platformId.getName());\r
368 getProject().setProperty("PLATFORM_FILE", platformId.getRelativeFpdFile().replaceAll("(\\\\)", "/"));\r
369 getProject().setProperty("PLATFORM_DIR", platformId.getFpdFile().getParent().replaceAll("(\\\\)", "/"));\r
370 getProject().setProperty("PLATFORM_RELATIVE_DIR", platformId.getPlatformRelativeDir().replaceAll("(\\\\)", "/"));\r
371 \r
372 if( !FrameworkBuildTask.multithread) {\r
373 FrameworkBuildTask.originalProperties.put("PLATFORM", platformId.getName());\r
374 FrameworkBuildTask.originalProperties.put("PLATFORM_FILE", platformId.getRelativeFpdFile().replaceAll("(\\\\)", "/"));\r
375 FrameworkBuildTask.originalProperties.put("PLATFORM_DIR", platformId.getFpdFile().getParent().replaceAll("(\\\\)", "/"));\r
376 FrameworkBuildTask.originalProperties.put("PLATFORM_RELATIVE_DIR", platformId.getPlatformRelativeDir().replaceAll("(\\\\)", "/"));\r
377 }\r
378\r
379 //\r
380 // Build mode. User-defined output dir.\r
381 //\r
382 String buildMode = saq.getFpdIntermediateDirectories();\r
383 String userDefinedOutputDir = saq.getFpdOutputDirectory();\r
384\r
385 OutputManager.getInstance().setup(userDefinedOutputDir, buildMode);\r
386\r
387 //\r
388 // TBD. Deal PCD and BuildOption related Info\r
389 //\r
390 GlobalData.setFpdBuildOptions(saq.getFpdBuildOptions());\r
391\r
392 GlobalData.setToolChainPlatformInfo(saq.getFpdToolChainInfo());\r
393\r
394 //\r
395 // Parse all list modules SA\r
396 //\r
397 parseModuleSAFiles();\r
398\r
399 //\r
400 // TBD. Deal PCD and BuildOption related Info\r
401 //\r
402 parseToolChainFamilyOptions();\r
403 parseToolChainOptions();\r
404\r
405 saq.push(map);\r
406\r
407 //\r
408 // Pcd Collection. Call CollectPCDAction to collect pcd info.\r
409 //\r
410 PlatformPcdPreprocessActionForBuilding ca = new PlatformPcdPreprocessActionForBuilding();\r
411 ca.perform(platformId.getFpdFile().getPath(), ActionMessage.NULL_MESSAGE_LEVEL);\r
412 } catch (IOException ex) {\r
413 BuildException buildException = new BuildException("Parsing of the FPD file [" + fpdFile.getPath() + "] failed!\n" + ex.getMessage());\r
414 buildException.setStackTrace(ex.getStackTrace());\r
415 throw buildException;\r
416 } catch (XmlException ex) {\r
417 BuildException buildException = new BuildException("Parsing of the FPD file [" + fpdFile.getPath() + "] failed!\n" + ex.getMessage());\r
418 buildException.setStackTrace(ex.getStackTrace());\r
419 throw buildException;\r
420 } catch (EdkException ex) {\r
421 BuildException buildException = new BuildException("Parsing of the FPD file [" + fpdFile.getPath() + "] failed!\n" + ex.getMessage());\r
422 buildException.setStackTrace(ex.getStackTrace());\r
423 throw buildException;\r
424 }\r
425 }\r
426\r
427 /**\r
428 Parse all modules listed in FPD file.\r
429 **/\r
430 void parseModuleSAFiles() throws EdkException{\r
431 Map<FpdModuleIdentification, Map<String, XmlObject>> moduleSAs = saq.getFpdModules();\r
432\r
433 //\r
434 // For every Module lists in FPD file.\r
435 //\r
436 Set<FpdModuleIdentification> keys = moduleSAs.keySet();\r
437 Iterator iter = keys.iterator();\r
438 while (iter.hasNext()) {\r
439 FpdModuleIdentification fpdModuleId = (FpdModuleIdentification) iter.next();\r
440\r
441 //\r
442 // Judge if Module is existed?\r
443 // TBD\r
444 GlobalData.registerFpdModuleSA(fpdModuleId, moduleSAs.get(fpdModuleId));\r
445\r
446 //\r
447 // Put fpdModuleId to the corresponding FV\r
448 //\r
449 saq.push(GlobalData.getDoc(fpdModuleId));\r
450 String fvBinding = saq.getModuleFvBindingKeyword();\r
451\r
452 fpdModuleId.setFvBinding(fvBinding);\r
453 updateFvs(fvBinding, fpdModuleId);\r
454\r
455 //\r
456 // Prepare for out put file name\r
457 //\r
458 ModuleIdentification moduleId = fpdModuleId.getModule();\r
459\r
460 String baseName = saq.getModuleOutputFileBasename();\r
461 \r
462 if (baseName == null) {\r
463 baseName = moduleId.getName();\r
464 }\r
465 outfiles.put(fpdModuleId, fpdModuleId.getArch() + File.separatorChar\r
466 + moduleId.getGuid() + "-" + baseName\r
467 + getSuffix(moduleId.getModuleType()));\r
468\r
469 //\r
470 // parse module build options, if any\r
471 //\r
472 GlobalData.addModuleToolChainOption(fpdModuleId, parseModuleBuildOptions(false));\r
473 GlobalData.addModuleToolChainFamilyOption(fpdModuleId, parseModuleBuildOptions(true));\r
474 saq.pop();\r
475 }\r
476 }\r
477\r
478 ToolChainMap parseModuleBuildOptions(boolean toolChainFamilyFlag) throws EdkException {\r
479 String[][] options = saq.getModuleBuildOptions(toolChainFamilyFlag);\r
480 if (options == null || options.length == 0) {\r
481 return new ToolChainMap();\r
482 }\r
483 return parseOptions(options);\r
484 }\r
485\r
486 private ToolChainMap parsePlatformBuildOptions(boolean toolChainFamilyFlag) throws EdkException {\r
487 String[][] options = saq.getPlatformBuildOptions(toolChainFamilyFlag);\r
488 if (options == null || options.length == 0) {\r
489 return new ToolChainMap();\r
490 }\r
491 return parseOptions(options);\r
492 }\r
493\r
494 private ToolChainMap parseOptions(String[][] options) throws EdkException {\r
495 ToolChainMap map = new ToolChainMap();\r
496 int flagIndex = ToolChainElement.ATTRIBUTE.value;\r
497\r
498 for (int i = 0; i < options.length; ++i) {\r
499 String flagString = options[i][flagIndex];\r
500 if (flagString == null) {\r
501 flagString = "";\r
502 }\r
503 options[i][flagIndex] = ToolChainAttribute.FLAGS + "";\r
504 map.put(options[i], flagString.trim());\r
505 }\r
506\r
507 return map;\r
508 }\r
509\r
510 private void parseToolChainFamilyOptions() throws EdkException {\r
511 GlobalData.setPlatformToolChainFamilyOption(parsePlatformBuildOptions(true));\r
512 }\r
513\r
514 private void parseToolChainOptions() throws EdkException {\r
515 GlobalData.setPlatformToolChainOption(parsePlatformBuildOptions(false));\r
516 }\r
517\r
518 /**\r
519 Add the current module to corresponding FV.\r
520\r
521 @param fvName current FV name\r
522 @param moduleName current module identification\r
523 **/\r
524 void updateFvs(String fvName, FpdModuleIdentification fpdModuleId) {\r
525 if (fvName == null || fvName.trim().length() == 0) {\r
526 fvName = "NULL";\r
527 }\r
528 String[] fvNameArray = fvName.split("[, \t]+");\r
529 for (int i = 0; i < fvNameArray.length; i++) {\r
530 //\r
531 // Put module to corresponding fvName\r
532 //\r
533 if (fvs.containsKey(fvNameArray[i])) {\r
534 Set<FpdModuleIdentification> set = fvs.get(fvNameArray[i]);\r
535 set.add(fpdModuleId);\r
536 } else {\r
537 Set<FpdModuleIdentification> set = new LinkedHashSet<FpdModuleIdentification>();\r
538 set.add(fpdModuleId);\r
539 fvs.put(fvNameArray[i], set);\r
540 }\r
541 }\r
542 }\r
543\r
544 /**\r
545 Get the suffix based on module type. Current relationship are listed:\r
546\r
547 <pre>\r
548 <b>ModuleType</b> <b>Suffix</b>\r
549 BASE .FFS\r
550 SEC .SEC\r
551 PEI_CORE .PEI\r
552 PEIM .PEI\r
553 DXE_CORE .DXE\r
554 DXE_DRIVER .DXE\r
555 DXE_RUNTIME_DRIVER .DXE\r
556 DXE_SAL_DRIVER .DXE\r
557 DXE_SMM_DRIVER .DXE\r
558 TOOL .FFS\r
559 UEFI_DRIVER .DXE\r
560 UEFI_APPLICATION .APP\r
561 USER_DEFINED .FFS\r
562 </pre>\r
563\r
564 @param moduleType module type\r
565 @return\r
566 @throws BuildException\r
567 If module type is null\r
568 **/\r
569 public static String getSuffix(String moduleType) throws BuildException {\r
570 if (moduleType == null) {\r
571 throw new BuildException("Module type is not specified.");\r
572 }\r
573\r
574 String[][] suffix = EdkDefinitions.ModuleTypeExtensions;\r
575\r
576 for (int i = 0; i < suffix.length; i++) {\r
577 if (suffix[i][0].equalsIgnoreCase(moduleType)) {\r
578 return suffix[i][1];\r
579 }\r
580 }\r
581 //\r
582 // Default is '.FFS'\r
583 //\r
584 return ".FFS";\r
585 }\r
586 /**\r
587 Add a property.\r
588\r
589 @param p property\r
590 **/\r
591 public void addProperty(Property p) {\r
592 properties.addElement(p);\r
593 }\r
594\r
595 public void setFpdFile(File fpdFile) {\r
596 this.fpdFile = fpdFile;\r
597 }\r
598\r
599 public void setType(String type) {\r
600 this.type = type;\r
601 }\r
602 \r
603 public String getAllArchForModule(ModuleIdentification moduleId) {\r
604 String archs = "";\r
605 Iterator<FpdModuleIdentification> iter = outfiles.keySet().iterator();\r
606 while (iter.hasNext()) {\r
607 FpdModuleIdentification fpdModuleId = iter.next();\r
608 \r
609 if (fpdModuleId.getModule().equals(moduleId)) {\r
610 archs += fpdModuleId.getArch() + " ";\r
611 }\r
612 }\r
613 \r
614 return archs;\r
615 }\r
616}\r