コード例 #1
0
ファイル: Module.java プロジェクト: Timon87/husacct
 public boolean hasSoftwareUnit(String softwareUnitName) {
   boolean hasSoftwareUnit = false;
   for (SoftwareUnitDefinition unit : mappedSUunits) {
     if (unit.getName().equals(softwareUnitName)) {
       hasSoftwareUnit = true;
     }
   }
   for (Module mod : subModules) {
     if (mod.hasSoftwareUnit(softwareUnitName)) {
       hasSoftwareUnit = true;
     }
   }
   return hasSoftwareUnit;
 }
コード例 #2
0
ファイル: Module.java プロジェクト: Timon87/husacct
 public SoftwareUnitDefinition getSoftwareUnitByName(String softwareUnitName) {
   SoftwareUnitDefinition softwareUnit = null;
   for (SoftwareUnitDefinition unit : mappedSUunits) {
     if (unit.getName().equals(softwareUnitName)) {
       softwareUnit = unit;
     }
   }
   for (Module mod : subModules) {
     if (mod.hasSoftwareUnit(softwareUnitName)) {
       softwareUnit = getSoftwareUnitByName(softwareUnitName);
     }
   }
   if (softwareUnit == null) {
     throw new RuntimeException("This Software Unit does not exist!");
   }
   return softwareUnit;
 }