test_class.file: dubbo-common/src/test/java/org/apache/dubbo/common/utils/ClassUtilsTest.java
test_class.identifier: ClassUtilsTest
test_case.body: @Test
      public void testConvertPrimitive() throws Exception {
  
          assertThat(ClassUtils.convertPrimitive(char.class, ""), equalTo('\0'));
          assertThat(ClassUtils.convertPrimitive(char.class, null), equalTo(null));
          assertThat(ClassUtils.convertPrimitive(char.class, "6"), equalTo('6'));
  
          assertThat(ClassUtils.convertPrimitive(boolean.class, ""), equalTo(Boolean.FALSE));
          assertThat(ClassUtils.convertPrimitive(boolean.class, null), equalTo(null));
          assertThat(ClassUtils.convertPrimitive(boolean.class, "true"), equalTo(Boolean.TRUE));
  
  
          assertThat(ClassUtils.convertPrimitive(byte.class, ""), equalTo(null));
          assertThat(ClassUtils.convertPrimitive(byte.class, null), equalTo(null));
          assertThat(ClassUtils.convertPrimitive(byte.class, "127"), equalTo(Byte.MAX_VALUE));
  
  
          assertThat(ClassUtils.convertPrimitive(short.class, ""), equalTo(null));
          assertThat(ClassUtils.convertPrimitive(short.class, null), equalTo(null));
          assertThat(ClassUtils.convertPrimitive(short.class, "32767"), equalTo(Short.MAX_VALUE));
  
          assertThat(ClassUtils.convertPrimitive(int.class, ""), equalTo(null));
          assertThat(ClassUtils.convertPrimitive(int.class, null), equalTo(null));
          assertThat(ClassUtils.convertPrimitive(int.class, "6"), equalTo(6));
  
          assertThat(ClassUtils.convertPrimitive(long.class, ""), equalTo(null));
          assertThat(ClassUtils.convertPrimitive(long.class, null), equalTo(null));
          assertThat(ClassUtils.convertPrimitive(long.class, "6"), equalTo(new Long(6)));
  
          assertThat(ClassUtils.convertPrimitive(float.class, ""), equalTo(null));
          assertThat(ClassUtils.convertPrimitive(float.class, null), equalTo(null));
          assertThat(ClassUtils.convertPrimitive(float.class, "1.1"), equalTo(new Float(1.1)));
  
          assertThat(ClassUtils.convertPrimitive(double.class, ""), equalTo(null));
          assertThat(ClassUtils.convertPrimitive(double.class, null), equalTo(null));
          assertThat(ClassUtils.convertPrimitive(double.class, "10.1"), equalTo(new Double(10.1)));
      }
test_case.class_method_signature: ClassUtilsTest.testConvertPrimitive()
test_case.full_signature: @Test public void testConvertPrimitive()
test_case.identifier: testConvertPrimitive
test_case.invocations: assertThat convertPrimitive equalTo assertThat convertPrimitive equalTo assertThat convertPrimitive equalTo assertThat convertPrimitive equalTo assertThat convertPrimitive equalTo assertThat convertPrimitive equalTo assertThat convertPrimitive equalTo assertThat convertPrimitive equalTo assertThat convertPrimitive equalTo assertThat convertPrimitive equalTo assertThat convertPrimitive equalTo assertThat convertPrimitive equalTo assertThat convertPrimitive equalTo assertThat convertPrimitive equalTo assertThat convertPrimitive equalTo assertThat convertPrimitive equalTo assertThat convertPrimitive equalTo assertThat convertPrimitive equalTo assertThat convertPrimitive equalTo assertThat convertPrimitive equalTo assertThat convertPrimitive equalTo assertThat convertPrimitive equalTo assertThat convertPrimitive equalTo assertThat convertPrimitive equalTo
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testConvertPrimitive()
focal_class.declarator: ARRAY_SUFFIX = "[]"
focal_class.modifier: public static final
focal_class.original_string: public static final String ARRAY_SUFFIX = "[]";
focal_class.type: String
focal_class.var_name: ARRAY_SUFFIX
focal_class.declarator: SIMPLE_TYPES = ofSet(
              Void.class,
              Boolean.class,
              Character.class,
              Byte.class,
              Short.class,
              Integer.class,
              Long.class,
              Float.class,
              Double.class,
              String.class,
              BigDecimal.class,
              BigInteger.class,
              Date.class,
              Object.class
      )
focal_class.modifier: public static final
focal_class.original_string: public static final Set<Class<?>> SIMPLE_TYPES = ofSet(
              Void.class,
              Boolean.class,
              Character.class,
              Byte.class,
              Short.class,
              Integer.class,
              Long.class,
              Float.class,
              Double.class,
              String.class,
              BigDecimal.class,
              BigInteger.class,
              Date.class,
              Object.class
      );
focal_class.type: Set<Class<?>>
focal_class.var_name: SIMPLE_TYPES
focal_class.declarator: INTERNAL_ARRAY_PREFIX = "[L"
focal_class.modifier: private static final
focal_class.original_string: private static final String INTERNAL_ARRAY_PREFIX = "[L";
focal_class.type: String
focal_class.var_name: INTERNAL_ARRAY_PREFIX
focal_class.declarator: PRIMITIVE_TYPE_NAME_MAP = new HashMap<String, Class<?>>(32)
focal_class.modifier: private static final
focal_class.original_string: private static final Map<String, Class<?>> PRIMITIVE_TYPE_NAME_MAP = new HashMap<String, Class<?>>(32);
focal_class.type: Map<String, Class<?>>
focal_class.var_name: PRIMITIVE_TYPE_NAME_MAP
focal_class.declarator: PRIMITIVE_WRAPPER_TYPE_MAP = new HashMap<Class<?>, Class<?>>(16)
focal_class.modifier: private static final
focal_class.original_string: private static final Map<Class<?>, Class<?>> PRIMITIVE_WRAPPER_TYPE_MAP = new HashMap<Class<?>, Class<?>>(16);
focal_class.type: Map<Class<?>, Class<?>>
focal_class.var_name: PRIMITIVE_WRAPPER_TYPE_MAP
focal_class.declarator: PACKAGE_SEPARATOR_CHAR = '.'
focal_class.modifier: private static final
focal_class.original_string: private static final char PACKAGE_SEPARATOR_CHAR = '.';
focal_class.type: char
focal_class.var_name: PACKAGE_SEPARATOR_CHAR
focal_class.file: dubbo-common/src/main/java/org/apache/dubbo/common/utils/ClassUtils.java
focal_class.identifier: ClassUtils
focal_class.class_method_signature: ClassUtils.forNameWithThreadContextClassLoader(String name)
focal_class.full_signature: public static Class<?> forNameWithThreadContextClassLoader(String name)
focal_class.identifier: forNameWithThreadContextClassLoader
focal_class.modifiers: public static
focal_class.parameters: (String name)
focal_class.return: Class<?>
focal_class.signature: Class<?> forNameWithThreadContextClassLoader(String name)
focal_class.class_method_signature: ClassUtils.forNameWithCallerClassLoader(String name, Class<?> caller)
focal_class.full_signature: public static Class<?> forNameWithCallerClassLoader(String name, Class<?> caller)
focal_class.identifier: forNameWithCallerClassLoader
focal_class.modifiers: public static
focal_class.parameters: (String name, Class<?> caller)
focal_class.return: Class<?>
focal_class.signature: Class<?> forNameWithCallerClassLoader(String name, Class<?> caller)
focal_class.class_method_signature: ClassUtils.getCallerClassLoader(Class<?> caller)
focal_class.full_signature: public static ClassLoader getCallerClassLoader(Class<?> caller)
focal_class.identifier: getCallerClassLoader
focal_class.modifiers: public static
focal_class.parameters: (Class<?> caller)
focal_class.return: ClassLoader
focal_class.signature: ClassLoader getCallerClassLoader(Class<?> caller)
focal_class.class_method_signature: ClassUtils.getClassLoader(Class<?> clazz)
focal_class.full_signature: public static ClassLoader getClassLoader(Class<?> clazz)
focal_class.identifier: getClassLoader
focal_class.modifiers: public static
focal_class.parameters: (Class<?> clazz)
focal_class.return: ClassLoader
focal_class.signature: ClassLoader getClassLoader(Class<?> clazz)
focal_class.class_method_signature: ClassUtils.getClassLoader()
focal_class.full_signature: public static ClassLoader getClassLoader()
focal_class.identifier: getClassLoader
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: ClassLoader
focal_class.signature: ClassLoader getClassLoader()
focal_class.class_method_signature: ClassUtils.forName(String name)
focal_class.full_signature: public static Class<?> forName(String name)
focal_class.identifier: forName
focal_class.modifiers: public static
focal_class.parameters: (String name)
focal_class.return: Class<?>
focal_class.signature: Class<?> forName(String name)
focal_class.class_method_signature: ClassUtils.forName(String name, ClassLoader classLoader)
focal_class.full_signature: public static Class<?> forName(String name, ClassLoader classLoader)
focal_class.identifier: forName
focal_class.modifiers: public static
focal_class.parameters: (String name, ClassLoader classLoader)
focal_class.return: Class<?>
focal_class.signature: Class<?> forName(String name, ClassLoader classLoader)
focal_class.class_method_signature: ClassUtils.resolvePrimitiveClassName(String name)
focal_class.full_signature: public static Class<?> resolvePrimitiveClassName(String name)
focal_class.identifier: resolvePrimitiveClassName
focal_class.modifiers: public static
focal_class.parameters: (String name)
focal_class.return: Class<?>
focal_class.signature: Class<?> resolvePrimitiveClassName(String name)
focal_class.class_method_signature: ClassUtils.toShortString(Object obj)
focal_class.full_signature: public static String toShortString(Object obj)
focal_class.identifier: toShortString
focal_class.modifiers: public static
focal_class.parameters: (Object obj)
focal_class.return: String
focal_class.signature: String toShortString(Object obj)
focal_class.class_method_signature: ClassUtils.simpleClassName(Class<?> clazz)
focal_class.full_signature: public static String simpleClassName(Class<?> clazz)
focal_class.identifier: simpleClassName
focal_class.modifiers: public static
focal_class.parameters: (Class<?> clazz)
focal_class.return: String
focal_class.signature: String simpleClassName(Class<?> clazz)
focal_class.class_method_signature: ClassUtils.isPrimitive(Class<?> type)
focal_class.full_signature: public static boolean isPrimitive(Class<?> type)
focal_class.identifier: isPrimitive
focal_class.modifiers: public static
focal_class.parameters: (Class<?> type)
focal_class.return: boolean
focal_class.signature: boolean isPrimitive(Class<?> type)
focal_class.class_method_signature: ClassUtils.isSimpleType(Class<?> type)
focal_class.full_signature: public static boolean isSimpleType(Class<?> type)
focal_class.identifier: isSimpleType
focal_class.modifiers: public static
focal_class.parameters: (Class<?> type)
focal_class.return: boolean
focal_class.signature: boolean isSimpleType(Class<?> type)
focal_class.class_method_signature: ClassUtils.convertPrimitive(Class<?> type, String value)
focal_class.full_signature: public static Object convertPrimitive(Class<?> type, String value)
focal_class.identifier: convertPrimitive
focal_class.modifiers: public static
focal_class.parameters: (Class<?> type, String value)
focal_class.return: Object
focal_class.signature: Object convertPrimitive(Class<?> type, String value)
focal_class.class_method_signature: ClassUtils.isTypeMatch(Class<?> type, String value)
focal_class.full_signature: public static boolean isTypeMatch(Class<?> type, String value)
focal_class.identifier: isTypeMatch
focal_class.modifiers: public static
focal_class.parameters: (Class<?> type, String value)
focal_class.return: boolean
focal_class.signature: boolean isTypeMatch(Class<?> type, String value)
focal_class.class_method_signature: ClassUtils.getAllSuperClasses(Class<?> type, Predicate<Class<?>>... classFilters)
focal_class.full_signature: public static Set<Class<?>> getAllSuperClasses(Class<?> type, Predicate<Class<?>>... classFilters)
focal_class.identifier: getAllSuperClasses
focal_class.modifiers: public static
focal_class.parameters: (Class<?> type, Predicate<Class<?>>... classFilters)
focal_class.return: Set<Class<?>>
focal_class.signature: Set<Class<?>> getAllSuperClasses(Class<?> type, Predicate<Class<?>>... classFilters)
focal_class.class_method_signature: ClassUtils.getAllInterfaces(Class<?> type, Predicate<Class<?>>... interfaceFilters)
focal_class.full_signature: public static Set<Class<?>> getAllInterfaces(Class<?> type, Predicate<Class<?>>... interfaceFilters)
focal_class.identifier: getAllInterfaces
focal_class.modifiers: public static
focal_class.parameters: (Class<?> type, Predicate<Class<?>>... interfaceFilters)
focal_class.return: Set<Class<?>>
focal_class.signature: Set<Class<?>> getAllInterfaces(Class<?> type, Predicate<Class<?>>... interfaceFilters)
focal_class.class_method_signature: ClassUtils.getAllInheritedTypes(Class<?> type, Predicate<Class<?>>... typeFilters)
focal_class.full_signature: public static Set<Class<?>> getAllInheritedTypes(Class<?> type, Predicate<Class<?>>... typeFilters)
focal_class.identifier: getAllInheritedTypes
focal_class.modifiers: public static
focal_class.parameters: (Class<?> type, Predicate<Class<?>>... typeFilters)
focal_class.return: Set<Class<?>>
focal_class.signature: Set<Class<?>> getAllInheritedTypes(Class<?> type, Predicate<Class<?>>... typeFilters)
focal_class.class_method_signature: ClassUtils.isAssignableFrom(Class<?> superType, Class<?> targetType)
focal_class.full_signature: public static boolean isAssignableFrom(Class<?> superType, Class<?> targetType)
focal_class.identifier: isAssignableFrom
focal_class.modifiers: public static
focal_class.parameters: (Class<?> superType, Class<?> targetType)
focal_class.return: boolean
focal_class.signature: boolean isAssignableFrom(Class<?> superType, Class<?> targetType)
focal_class.class_method_signature: ClassUtils.isPresent(String className, ClassLoader classLoader)
focal_class.full_signature: public static boolean isPresent(String className, ClassLoader classLoader)
focal_class.identifier: isPresent
focal_class.modifiers: public static
focal_class.parameters: (String className, ClassLoader classLoader)
focal_class.return: boolean
focal_class.signature: boolean isPresent(String className, ClassLoader classLoader)
focal_class.class_method_signature: ClassUtils.resolveClass(String className, ClassLoader classLoader)
focal_class.full_signature: public static Class<?> resolveClass(String className, ClassLoader classLoader)
focal_class.identifier: resolveClass
focal_class.modifiers: public static
focal_class.parameters: (String className, ClassLoader classLoader)
focal_class.return: Class<?>
focal_class.signature: Class<?> resolveClass(String className, ClassLoader classLoader)
focal_class.class_method_signature: ClassUtils.isGenericClass(Class<?> type)
focal_class.full_signature: public static boolean isGenericClass(Class<?> type)
focal_class.identifier: isGenericClass
focal_class.modifiers: public static
focal_class.parameters: (Class<?> type)
focal_class.return: boolean
focal_class.signature: boolean isGenericClass(Class<?> type)
focal_method.body: public static Object convertPrimitive(Class<?> type, String value) {
          if (value == null) {
              return null;
          } else if (type == char.class || type == Character.class) {
              return value.length() > 0 ? value.charAt(0) : '\0';
          } else if (type == boolean.class || type == Boolean.class) {
              return Boolean.valueOf(value);
          }
          try {
              if (type == byte.class || type == Byte.class) {
                  return Byte.valueOf(value);
              } else if (type == short.class || type == Short.class) {
                  return Short.valueOf(value);
              } else if (type == int.class || type == Integer.class) {
                  return Integer.valueOf(value);
              } else if (type == long.class || type == Long.class) {
                  return Long.valueOf(value);
              } else if (type == float.class || type == Float.class) {
                  return Float.valueOf(value);
              } else if (type == double.class || type == Double.class) {
                  return Double.valueOf(value);
              }
          } catch (NumberFormatException e) {
              return null;
          }
          return value;
      }
focal_method.class_method_signature: ClassUtils.convertPrimitive(Class<?> type, String value)
focal_method.full_signature: public static Object convertPrimitive(Class<?> type, String value)
focal_method.identifier: convertPrimitive
focal_method.invocations: length charAt valueOf valueOf valueOf valueOf valueOf valueOf valueOf
focal_method.modifiers: public static
focal_method.parameters: (Class<?> type, String value)
focal_method.return: Object
focal_method.signature: Object convertPrimitive(Class<?> type, String value)