Class ClassUtil

java.lang.Object
org.apache.hadoop.util.ClassUtil

@Private public class ClassUtil extends Object
  • Constructor Details

    • ClassUtil

      public ClassUtil()
  • Method Details

    • findContainingJar

      public static String findContainingJar(Class<?> clazz)
      Find a jar that contains a class of the same name, if any. It will return a jar file, even if that is not the first thing on the class path that has a class with the same name.
      Parameters:
      clazz - the class to find.
      Returns:
      a jar file that contains the class, or null.
    • findClassLocation

      public static String findClassLocation(Class<?> clazz)
      Find the absolute location of the class.
      Parameters:
      clazz - the class to find.
      Returns:
      the class file with absolute location, or null.