public final class ClassUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static Class<? extends FileSystem> |
getFileSystemByName(String className)
Searches for a file system class by its name and attempts to load it.
|
static Class<? extends VersionedProtocol> |
getProtocolByName(String className)
Searches for a protocol class by its name and attempts to load it.
|
static Class<? extends IOReadableWritable> |
getRecordByName(String className)
Searches for a record class by its name and attempts to load it.
|
static boolean |
isBoxedTypeOrString(Class<?> clazz) |
static boolean |
isPrimitiveOrBoxedOrString(Class<?> clazz) |
static Class<?> |
resolveClassPrimitiveAware(String className) |
public static Class<? extends VersionedProtocol> getProtocolByName(String className) throws ClassNotFoundException
className - the name of the protocol classClassNotFoundException - thrown if no class with such a name can be foundpublic static Class<? extends IOReadableWritable> getRecordByName(String className) throws ClassNotFoundException
className - the name of the record classClassNotFoundException - thrown if no class with such a name can be foundpublic static Class<? extends FileSystem> getFileSystemByName(String className) throws ClassNotFoundException
className - the name of the file system classClassNotFoundException - thrown if no class with such a name can be foundpublic static Class<?> resolveClassPrimitiveAware(String className) throws ClassNotFoundException
ClassNotFoundExceptionpublic static boolean isPrimitiveOrBoxedOrString(Class<?> clazz)
public static boolean isBoxedTypeOrString(Class<?> clazz)
Copyright © 2015 The Apache Software Foundation. All rights reserved.