code: public static String getAPIVersion(final Class<?> clazz) {
          if (versionMap.containsKey(clazz)) {
              return versionMap.get(clazz);
          }
  
          Attributes atts = null;
          String version = null;
          try {
              atts = getAttributesForClass(clazz);
          } catch (IOException ex) {
              LOG.debug("Unable to open Manifest stream for class: " + clazz.getName(), ex);
          }
  
          if (atts != null) {
              version = atts.getValue("Implementation-Version");
          }
  
          // if we can't get version from the jar, try for the package version
          if (version == null) {
              Package pkg = clazz.getPackage();
              if (pkg != null) version = pkg.getImplementationVersion();
          }
          if (version == null) version = "unknown";
  
          versionMap.put(clazz, version);
  
          return version;
      }
docs: Get the Version Number for a specific class. The archive the class belongs to must have been built with maven and the
  "Implementation-Version" must exist in the MANIFEST.MF. This can be set by adding the following to the pom:
  <p/>
  <pre>
  {@code
  <build>
  <plugins>
  <plugin>
  <artifactId>maven-jar-plugin</artifactId>
  <configuration>
  <archive>
  <manifest>
  <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
  <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
  </manifest>
  </archive>
  </configuration>
  </plugin>
  </plugins>
  </build>}
  </pre>
  <p/>
  Thanks to the Zanata Team for this method, it has just been edited for this libraries needs.
  
  @param clazz The class to find the Version Information for.
  @return The Version number or "unknown" if the version couldn't be found.