+ //\r
+ // The algorithm for PCD of msa should be:\r
+ // 1. If the type of PCD from Spd is FEATURE_FLAG, \r
+ // the type of Msa only can be FEATURE_FLAG.\r
+ // 2. If the type of PCD from Spd is not FEATURE_FLAG, \r
+ // the type of Msa could be selected from the PCD's all types and "DYNAMIC" type.\r
+ //\r
+ boolean hasFEATURE_FLAG = false;\r
+ boolean hasDYNAMIC = false;\r
+ for (int indexOfType = 0; indexOfType < type.size(); indexOfType++) {\r
+ if (type.elementAt(indexOfType).equals(DataType.PCD_ITEM_TYPE_DYNAMIC)) {\r
+ hasDYNAMIC = true;\r
+ }\r
+ if(type.elementAt(indexOfType).equals(DataType.PCD_ITEM_TYPE_FEATURE_FLAG)) {\r
+ hasFEATURE_FLAG = true;\r
+ }\r
+ }\r
+ if (hasFEATURE_FLAG) {\r
+ type.removeAllElements();\r
+ type.addElement(DataType.PCD_ITEM_TYPE_FEATURE_FLAG);\r
+ } else {\r
+ if (!hasDYNAMIC) {\r
+ type.addElement(DataType.PCD_ITEM_TYPE_DYNAMIC);\r
+ }\r
+ }\r