Class ProviderInfo

  • Direct Known Subclasses:
    ReaderWriterProviderInfo, StreamProviderInfo

    public class ProviderInfo
    extends java.lang.Object
    Provides provider info, like vendor name and version, for ImageReaderWriterSpi subclasses based on information in the manifest.
    Version:
    $Id: ProviderInfo.java,v 1.0 Oct 31, 2009 3:49:39 PM haraldk Exp$
    See Also:
    JAR Manifest
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String title  
      private java.lang.String vendorName  
      private java.lang.String version  
    • Constructor Summary

      Constructors 
      Constructor Description
      ProviderInfo​(java.lang.Package pPackage)
      Creates a provider information instance based on the given package.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private static java.lang.String fakeVendor​(java.lang.Package pPackage)  
      private java.lang.String fakeVersion​(java.lang.Package pPackage)  
      (package private) java.lang.String getImplementationTitle()
      Returns the implementation title, as specified in the manifest entry Implementation-Title for the package.
      java.lang.String getVendorName()
      Returns the vendor name, as specified in the manifest entry Implementation-Vendor for the package.
      java.lang.String getVersion()
      Returns the version/build number string, as specified in the manifest entry Implementation-Version for the package.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • title

        private final java.lang.String title
      • vendorName

        private final java.lang.String vendorName
      • version

        private final java.lang.String version
    • Constructor Detail

      • ProviderInfo

        public ProviderInfo​(java.lang.Package pPackage)
        Creates a provider information instance based on the given package.
        Parameters:
        pPackage - the package to get provider information from. This should typically be the package containing the Spi class.
        Throws:
        java.lang.IllegalArgumentException - if pPackage == null
    • Method Detail

      • fakeVendor

        private static java.lang.String fakeVendor​(java.lang.Package pPackage)
      • fakeVersion

        private java.lang.String fakeVersion​(java.lang.Package pPackage)
      • getImplementationTitle

        final java.lang.String getImplementationTitle()
        Returns the implementation title, as specified in the manifest entry Implementation-Title for the package. If the title is unavailable, the package name or some default name for known packages are used.
        Returns:
        the implementation title
      • getVendorName

        public final java.lang.String getVendorName()
        Returns the vendor name, as specified in the manifest entry Implementation-Vendor for the package. If the vendor name is unavailable, the package name or some default name for known packages are used.
        Returns:
        the vendor name.
      • getVersion

        public final java.lang.String getVersion()
        Returns the version/build number string, as specified in the manifest entry Implementation-Version for the package. If the version is unavailable, some arbitrary (non-null) value is used.
        Returns:
        the vendor name.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object