public final class ClassUtil extends Object
Modifier and Type | Method and Description |
---|---|
static String |
getClassName(Class cls)
Return only the class name, without package.
|
static String |
getClassName(String fullName)
Return only the class name.
|
static String |
getPackageName(Class cls)
Return only the package, or empty string if none.
|
static String |
getPackageName(String fullName)
Return only the package, or empty string if none.
|
static Class |
toClass(String str,
boolean resolve,
ClassLoader loader)
Return the class for the given string, correctly handling
primitive types.
|
static Class |
toClass(String str,
ClassLoader loader)
Return the class for the given string, correctly handling
primitive types.
|
public static Class toClass(String str, ClassLoader loader)
RuntimeException
- on load errorpublic static Class toClass(String str, boolean resolve, ClassLoader loader)
RuntimeException
- on load errorpublic static String getClassName(Class cls)
public static String getPackageName(Class cls)
Copyright © 2006–2020 Apache Software Foundation. All rights reserved.