public class JavaUtils extends Object
| Constructor and Description |
|---|
JavaUtils() |
| Modifier and Type | Method and Description |
|---|---|
static <T> Class<? extends T> |
getClass(String className,
Class<T> clazz) |
static ClassLoader |
getClassLoader()
Standard way of getting classloader in Hive code (outside of Hadoop).
|
static <T> T |
newInstance(Class<T> theClass,
Class<?>[] parameterTypes,
Object[] initArgs)
Create an object of the given class.
|
public static ClassLoader getClassLoader()
Uses the context loader to get access to classpaths to auxiliary and jars added with 'add jar' command. Falls back to current classloader.
In Hadoop-related code, we use Configuration.getClassLoader().
public static <T> Class<? extends T> getClass(String className, Class<T> clazz) throws MetaException
MetaExceptionCopyright © 2022 The Apache Software Foundation. All rights reserved.