Class ClassFinder

java.lang.Object
org.bzdev.lang.ClassFinder

public class ClassFinder extends Object
Class for determining information about a class given its name.
  • Method Details

    • classExists

      public static boolean classExists(String name)
      Determine if a class can be found using the system class loader.

      The class name must be a fully qualified binary name - a period separates package components and the class name from a preceding package name, and a dollar sign separates a inner classes from outer classes.

      One use case for this method is an Output Stream Graphics provider that checks if a particular class library is present.

      Parameters:
      name - the binary class name of a class
      Returns:
      true if the class can be found using the system class loader; false otherwise
    • getBinaryName

      public static String getBinaryName(String name)
      Get the binary name of a class given its canonical name.
      Parameters:
      name - the canonical name
      Returns:
      the binary name; null if the class cannot be found