code: private static void initFromPackage(PackageDescriptor pd,
                                          Package pkg) {
  
          pd.setExists(true);
  
          String specificationTitle = pkg.getSpecificationTitle();
          String specificationVersion = pkg.getSpecificationVersion(); 
          String specificationVendor = pkg.getSpecificationVendor();
  
          String implementationTitle = pkg.getImplementationTitle();
          String implementationVersion = pkg.getImplementationVersion(); 
          String implementationVendor = pkg.getImplementationVendor();
  
          if (implementationTitle == null) {
              implementationTitle = specificationTitle;
          }
  
          if (implementationVersion == null) {
              implementationVersion = specificationVersion;
          }
  
          if (implementationVendor == null) {
              implementationVendor = specificationVendor;
          }
  
  
          pd.setSpecificationTitle(specificationTitle);
          pd.setSpecificationVersion(specificationVersion);
          pd.setSpecificationVendor(specificationVendor);
  
          pd.setImplementationTitle(implementationTitle);
          pd.setImplementationVersion(implementationVersion);
          pd.setImplementationVendor(implementationVendor);
  
          pd.setProduct(implementationTitle);
          pd.setProductVersion(implementationVersion);
      }
docs: Initialize the PackageDescriptor from the Package