public void addConfiguredExportPackage(OSGiPackage osgiPackage) {
   final String name = osgiPackage.getName();
   if (name == null) {
     throw new BuildException("ExportPackage must have a name");
   } else if (osgiPackage.getPrefix() != null) {
     throw new BuildException("ExportPackage must not have a prefix attribute");
   } else {
     exportPackage.put(name, osgiPackage.getVersion());
   }
 }
 public void addConfiguredStandardPackage(OSGiPackage osgiPackage) {
   final String name = osgiPackage.getName();
   final String prefix = osgiPackage.getPrefix();
   if (name != null && prefix == null) {
     bpInfo.addProvidedPackage(name);
   } else if (prefix != null && name == null) {
     standardPackagePrefixes.add(prefix);
   } else {
     throw new BuildException(
         "StandardPackage must have exactly one of the name and prefix attributes defined");
   }
 }