com.alibaba.dubbo.common.compiler.support
Class ClassUtils

java.lang.Object
  extended by com.alibaba.dubbo.common.compiler.support.ClassUtils

public class ClassUtils
extends Object

ClassUtils. (Tool, Static, ThreadSafe)

Author:
william.liangf

Field Summary
static String CLASS_EXTENSION
           
static String JAVA_EXTENSION
           
 
Method Summary
static Class<?> _forName(String className)
           
static Boolean boxed(boolean v)
           
static Byte boxed(byte v)
           
static Character boxed(char v)
           
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)
           
static void checkBytecode(String name, byte[] bytecode)
           
static Class<?> forName(String className)
           
static Class<?> forName(String[] packages, String className)
           
static Class<?> getBoxedClass(Class<?> 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)
           
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)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_EXTENSION

public static final String CLASS_EXTENSION
See Also:
Constant Field Values

JAVA_EXTENSION

public static final String JAVA_EXTENSION
See Also:
Constant Field Values
Method Detail

newInstance

public static Object newInstance(String name)

forName

public static Class<?> forName(String[] packages,
                               String className)

forName

public static Class<?> forName(String className)

_forName

public static Class<?> _forName(String className)
                         throws ClassNotFoundException
Throws:
ClassNotFoundException

getBoxedClass

public static Class<?> getBoxedClass(Class<?> type)

boxed

public static Boolean boxed(boolean v)

boxed

public static Character boxed(char v)

boxed

public static Byte boxed(byte v)

boxed

public static Short boxed(short v)

boxed

public static Integer boxed(int v)

boxed

public static Long boxed(long v)

boxed

public static Float boxed(float v)

boxed

public static Double boxed(double v)

boxed

public static Object boxed(Object v)

unboxed

public static boolean unboxed(Boolean v)

unboxed

public static char unboxed(Character v)

unboxed

public static byte unboxed(Byte v)

unboxed

public static short unboxed(Short v)

unboxed

public static int unboxed(Integer v)

unboxed

public static long unboxed(Long v)

unboxed

public static float unboxed(Float v)

unboxed

public static double unboxed(Double v)

unboxed

public static Object unboxed(Object v)

isNotEmpty

public static boolean isNotEmpty(Object object)

getSize

public static int getSize(Object object)

toURI

public static URI toURI(String name)

getGenericClass

public static Class<?> getGenericClass(Class<?> cls)

getGenericClass

public static Class<?> getGenericClass(Class<?> cls,
                                       int i)

isBeforeJava5

public static boolean isBeforeJava5(String javaVersion)

isBeforeJava6

public static boolean isBeforeJava6(String javaVersion)

toString

public static String toString(Throwable e)

checkBytecode

public static void checkBytecode(String name,
                                 byte[] bytecode)

getSizeMethod

public static String getSizeMethod(Class<?> cls)

getMethodName

public static String getMethodName(Method method,
                                   Class<?>[] parameterClasses,
                                   String rightCode)

searchMethod

public static Method searchMethod(Class<?> currentClass,
                                  String name,
                                  Class<?>[] parameterTypes)
                           throws NoSuchMethodException
Throws:
NoSuchMethodException

getInitCode

public static String getInitCode(Class<?> type)

toMap

public static <K,V> Map<K,V> toMap(Map.Entry<K,V>[] entries)


Copyright © 2012–2017 Alibaba. All rights reserved.