public class ClassUtils extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
CLASS_EXTENSION
class file extension
|
static String |
JAVA_EXTENSION
java source file extension
|
| 限定符和类型 | 方法和说明 |
|---|---|
static Boolean |
boxed(boolean v)
Boxed primitive boolean type
|
static Byte |
boxed(byte v)
Boxed primitive byte type
|
static Character |
boxed(char v)
Boxed primitive char type
|
static Double |
boxed(double v) |
static Float |
boxed(float v) |
static Integer |
boxed(int v) |
static Long |
boxed(long v) |
static Object |
boxed(Object v) |
static Short |
boxed(short v)
Boxed primitive short type
|
static void |
checkBytecode(String name,
byte[] bytecode) |
static Class<?> |
doFormName(String className)
Use Class.forname to initialize class.
|
static Class<?> |
forName(String className)
Use Class.forname to initialize class.
|
static Class<?> |
forName(String[] packages,
String className)
Use Class.forname to initialize class.
|
static Class<?> |
getBoxedClass(Class<?> type)
Get boxed class for primitive type
|
static Class<?> |
getGenericClass(Class<?> cls) |
static Class<?> |
getGenericClass(Class<?> cls,
int i) |
static String |
getInitCode(Class<?> type) |
static String |
getMethodName(Method method,
Class<?>[] parameterClasses,
String rightCode) |
static int |
getSize(Object object) |
static String |
getSizeMethod(Class<?> cls) |
static boolean |
isBeforeJava5(String javaVersion) |
static boolean |
isBeforeJava6(String javaVersion) |
static boolean |
isNotEmpty(Object object) |
static Object |
newInstance(String name)
To new instance by class name
|
static Method |
searchMethod(Class<?> currentClass,
String name,
Class<?>[] parameterTypes) |
static <K,V> Map<K,V> |
toMap(Map.Entry<K,V>[] entries) |
static String |
toString(Throwable e) |
static URI |
toURI(String name) |
static boolean |
unboxed(Boolean v) |
static byte |
unboxed(Byte v) |
static char |
unboxed(Character v) |
static double |
unboxed(Double v) |
static float |
unboxed(Float v) |
static int |
unboxed(Integer v) |
static long |
unboxed(Long v) |
static Object |
unboxed(Object v) |
static short |
unboxed(Short v) |
public static Object newInstance(String name)
name - class namepublic static Class<?> forName(String[] packages, String className)
packages - package arrayclassName - class namepublic static Class<?> forName(String className)
className - class namepublic static Class<?> doFormName(String className) throws ClassNotFoundException
className - class nameClassNotFoundException - if class not foundpublic static Class<?> getBoxedClass(Class<?> type)
type - primitive class typepublic static Boolean boxed(boolean v)
v - boolean primitive typepublic static Character boxed(char v)
v - boolean char typepublic static Byte boxed(byte v)
v - boolean byte typepublic static Short boxed(short v)
v - boolean short typepublic static Integer boxed(int v)
public static Long boxed(long v)
public static Float boxed(float v)
public static Double boxed(double v)
public static boolean unboxed(Boolean v)
public static char unboxed(Character v)
public static byte unboxed(Byte v)
public static short unboxed(Short v)
public static int unboxed(Integer v)
public static long unboxed(Long v)
public static float unboxed(Float v)
public static double unboxed(Double v)
public static boolean isNotEmpty(Object object)
public static int getSize(Object object)
public static boolean isBeforeJava5(String javaVersion)
public static boolean isBeforeJava6(String javaVersion)
public static void checkBytecode(String name, byte[] bytecode)
public static String getMethodName(Method method, Class<?>[] parameterClasses, String rightCode)
public static Method searchMethod(Class<?> currentClass, String name, Class<?>[] parameterTypes) throws NoSuchMethodException
Copyright © 2016 Baidu, Inc.. All rights reserved.