public static Version getSpecificationVersionFor(Class<?> type)
   {
      Assert.notNull(type, "Type must not be null.");
      final Version result;
      Package pkg = type.getPackage();
      if (pkg == null)
      {
         result = EmptyVersion.getInstance();
      }
      else
      {
         String version = pkg.getSpecificationVersion();
         if (Strings.isNullOrEmpty(version))
         {
            result = EmptyVersion.getInstance();
         }
         else
         {
            result = SingleVersion.valueOf(version);
         }
      }
      return result;
   }
public static Version getSpecificationVersionFor ( Class < ? > type ) { Assert . notNull ( type , "Type must not be null." ) ; final Version result ; Package pkg = type . getPackage ( ) ; if ( pkg == null ) { result = EmptyVersion . getInstance ( ) ; } else { String version = pkg . getSpecificationVersion ( ) ; if ( Strings . isNullOrEmpty ( version ) ) { result = EmptyVersion . getInstance ( ) ; } else { result = SingleVersion . valueOf ( version ) ; } } return result ; }
Returns the Specification version for the given {@link Class}

@param type the {@link Class} with the corresponding package
@return {@link Version} representation from the {@link Package#getSpecificationVersion()} returned from
{@link Class#getPackage()}