类 ClassHelper


  • public class ClassHelper
    extends Object
    已过时。
    Replace to ClassUtils
    另请参阅:
    ClassUtils
    • 构造器详细资料

      • ClassHelper

        public ClassHelper()
        已过时。
    • 方法详细资料

      • getCallerClassLoader

        public static ClassLoader getCallerClassLoader​(Class<?> caller)
        已过时。
      • getClassLoader

        public static ClassLoader getClassLoader​(Class<?> clazz)
        已过时。
        get class loader
        参数:
        clazz -
        返回:
        class loader
      • getClassLoader

        public static ClassLoader getClassLoader()
        已过时。
        Return the default ClassLoader to use: typically the thread context ClassLoader, if available; the ClassLoader that loaded the ClassUtils class will be used as fallback.

        Call this method if you intend to use the thread context ClassLoader in a scenario where you absolutely need a non-null ClassLoader reference: for example, for class path resource loading (but not necessarily for Class.forName, which accepts a null ClassLoader reference as well).

        返回:
        the default ClassLoader (never null)
        另请参阅:
        Thread.getContextClassLoader()
      • resolvePrimitiveClassName

        public static Class<?> resolvePrimitiveClassName​(String name)
        已过时。
        Resolve the given class name as primitive class, if appropriate, according to the JVM's naming rules for primitive classes.

        Also supports the JVM's internal class names for primitive arrays. Does not support the "[]" suffix notation for primitive arrays; this is only supported by forName(java.lang.String).

        参数:
        name - the name of the potentially primitive class
        返回:
        the primitive class, or null if the name does not denote a primitive class or primitive array class
      • toShortString

        public static String toShortString​(Object obj)
        已过时。
      • simpleClassName

        public static String simpleClassName​(Class<?> clazz)
        已过时。
      • isGetter

        public static boolean isGetter​(Method method)
        已过时。
        Replace to MethodUtils#isGetter(Method)
        另请参阅:
        (Method)
      • isPrimitive

        public static boolean isPrimitive​(Class<?> type)
        已过时。
      • convertPrimitive

        public static Object convertPrimitive​(Class<?> type,
                                              String value)
        已过时。
      • isTypeMatch

        public static boolean isTypeMatch​(Class<?> type,
                                          String value)
        已过时。
        We only check boolean value at this moment.
        参数:
        type -
        value -
        返回: