Class LibraryChecker

java.lang.Object
loci.plugins.util.LibraryChecker

public final class LibraryChecker extends Object
Utility methods for verifying that classes are present and versions are correct.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    List of possible libraries for which to check.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Message to be displayed if ImageJ is too old for Bio-Formats plugins.
    static final String
    Minimum version of ImageJ necessary for Bio-Formats plugins.
    static final String
    URL for Bio-Formats web page.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    checkClass(String className)
    Checks whether the given class is available.
    static boolean
    Checks whether ImageJ is new enough for the Bio-Formats plugins.
    static boolean
    checkImageJ(String target, String msg)
    Returns true the current ImageJ version is greater than or equal to the specified version.
    static boolean
    checkImageJ(String target, String msg, String title)
    Returns true the current ImageJ version is greater than or equal to the specified version.
    static boolean
    Checks for a new enough version of the Java Runtime Environment.
    static void
    checkLibrary(String className, String jarFile, HashSet<String> missing)
    Checks whether the given class is available; if not, adds the specified JAR file name to the hash set (presumably to report it missing to the user).
    static void
    Checks for a required library.
    static boolean
    Reports missing libraries in the given hash set to the user.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • IMAGEJ_VERSION

      public static final String IMAGEJ_VERSION
      Minimum version of ImageJ necessary for Bio-Formats plugins.
      See Also:
    • IMAGEJ_MSG

      public static final String IMAGEJ_MSG
      Message to be displayed if ImageJ is too old for Bio-Formats plugins.
      See Also:
    • URL_BF_SOFTWARE

      public static final String URL_BF_SOFTWARE
      URL for Bio-Formats web page.
      See Also:
  • Constructor Details

    • LibraryChecker

      private LibraryChecker()
  • Method Details

    • checkClass

      public static boolean checkClass(String className)
      Checks whether the given class is available.
    • checkLibrary

      public static void checkLibrary(LibraryChecker.Library library, HashSet<String> missing)
      Checks for a required library.
    • checkLibrary

      public static void checkLibrary(String className, String jarFile, HashSet<String> missing)
      Checks whether the given class is available; if not, adds the specified JAR file name to the hash set (presumably to report it missing to the user).
    • checkJava

      public static boolean checkJava()
      Checks for a new enough version of the Java Runtime Environment.
    • checkImageJ

      public static boolean checkImageJ()
      Checks whether ImageJ is new enough for the Bio-Formats plugins.
    • checkImageJ

      public static boolean checkImageJ(String target, String msg)
      Returns true the current ImageJ version is greater than or equal to the specified version. Displays the given warning message if the current version is too old.
    • checkImageJ

      public static boolean checkImageJ(String target, String msg, String title)
      Returns true the current ImageJ version is greater than or equal to the specified version. Displays the given warning message with the specified title if the current version is too old.
    • checkMissing

      public static boolean checkMissing(HashSet<String> missing)
      Reports missing libraries in the given hash set to the user.
      Returns:
      true iff no libraries are missing (the hash set is empty).