@PrivateApi public final class ClassLoaderUtil extends Object
Modifier and Type | Field and Description |
---|---|
static String |
HAZELCAST_ARRAY |
static String |
HAZELCAST_BASE_PACKAGE |
Modifier and Type | Method and Description |
---|---|
static boolean |
implementsInterfaceWithSameName(Class<?> clazz,
Class<?> iface)
Check whether given class implements an interface with the same name.
|
static boolean |
isClassAvailable(ClassLoader classLoader,
String className) |
static boolean |
isClassDefined(String className)
Indicates whether or not the given class exists
|
static boolean |
isInternalType(Class type) |
static Class<?> |
loadClass(ClassLoader classLoader,
String className) |
static <T> T |
newInstance(Class<T> klass,
ClassLoader classLoader,
String className) |
static <T> T |
newInstance(ClassLoader classLoader,
String className) |
static Class<?> |
tryLoadClass(String className)
Tries to load the given class.
|
public static final String HAZELCAST_BASE_PACKAGE
public static final String HAZELCAST_ARRAY
public static <T> T newInstance(ClassLoader classLoader, String className) throws Exception
Exception
public static <T> T newInstance(Class<T> klass, ClassLoader classLoader, String className) throws Exception
Exception
public static Class<?> loadClass(ClassLoader classLoader, String className) throws ClassNotFoundException
ClassNotFoundException
public static boolean isClassAvailable(ClassLoader classLoader, String className)
public static boolean isInternalType(Class type)
public static Class<?> tryLoadClass(String className) throws ClassNotFoundException
className
- Name of the class to loadClassNotFoundException
- when the class is not foundpublic static boolean isClassDefined(String className)
className
- Name of the classtrue
if the class exists, false
otherwisepublic static boolean implementsInterfaceWithSameName(Class<?> clazz, Class<?> iface)
clazz
- class to check whether implements the interfaceiface
- interface to be implementedtrue
when the class implements the inteface with the same nameCopyright © 2017 Hazelcast, Inc.. All Rights Reserved.