ClassUtil (Apache Hadoop Common 3.5.0 API)
Description: declaration: package: org.apache.hadoop.util, class: ClassUtil

Package org.apache.hadoop.util

# Class ClassUtil

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

@Private public class ClassUtil extends Object

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ClassUtil()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static String`
  `findClassLocation(Class<?> clazz)`
  Find the absolute location of the class.
  `static String`
  `findContainingJar(Class<?> clazz)`
  Find a jar that contains a class of the same name, if any.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## 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.