Пример #1
0
 @Override
 public PackageSpec getPackageSpec(final String name) throws IOException {
   final PackageSpec spec = new PackageSpec();
   final Manifest manifest = getManifest();
   if (manifest == null) {
     return spec;
   }
   final Attributes mainAttribute = manifest.getMainAttributes();
   final Attributes entryAttribute = manifest.getAttributes(name);
   spec.setSpecTitle(
       getDefinedAttribute(Attributes.Name.SPECIFICATION_TITLE, entryAttribute, mainAttribute));
   spec.setSpecVersion(
       getDefinedAttribute(Attributes.Name.SPECIFICATION_VERSION, entryAttribute, mainAttribute));
   spec.setSpecVendor(
       getDefinedAttribute(Attributes.Name.SPECIFICATION_VENDOR, entryAttribute, mainAttribute));
   spec.setImplTitle(
       getDefinedAttribute(Attributes.Name.IMPLEMENTATION_TITLE, entryAttribute, mainAttribute));
   spec.setImplVersion(
       getDefinedAttribute(Attributes.Name.IMPLEMENTATION_VERSION, entryAttribute, mainAttribute));
   spec.setImplVendor(
       getDefinedAttribute(Attributes.Name.IMPLEMENTATION_VENDOR, entryAttribute, mainAttribute));
   return spec;
 }