Package org.apache.hadoop.util
Class ClassUtil
java.lang.Object
org.apache.hadoop.util.ClassUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringfindClassLocation(Class<?> clazz) Find the absolute location of the class.static StringfindContainingJar(Class<?> clazz) Find a jar that contains a class of the same name, if any.
-
Constructor Details
-
ClassUtil
public ClassUtil()
-
-
Method Details
-
findContainingJar
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
Find the absolute location of the class.- Parameters:
clazz- the class to find.- Returns:
- the class file with absolute location, or null.
-