test_class.file: server-core/src/test/java/io/onedev/server/util/ReflectionUtilsTest.java
test_class.identifier: ReflectionUtilsTest
test_case.body: @Test
  	public void shouldFindMethodCorrectly() {
  		Method method = ReflectionUtils.findMethod(SubClass4.class, "method", String.class, int.class);
  		assertSame(method.getReturnType(), String.class);
  
  		method = ReflectionUtils.findMethod(SuperClass1.class, "method", String.class, int.class);
  		assertSame(method.getReturnType(), Object.class);
  		
  		method = ReflectionUtils.findMethod(SubClass4.class, "method2", String.class);
  		assertSame(method.getParameterTypes()[0], String.class);
  
  		method = ReflectionUtils.findMethod(SubClass4.class, "method2", Object.class);
  		assertSame(method.getParameterTypes()[0], Object.class);
  	}
test_case.class_method_signature: ReflectionUtilsTest.shouldFindMethodCorrectly()
test_case.full_signature: @Test public void shouldFindMethodCorrectly()
test_case.identifier: shouldFindMethodCorrectly
test_case.invocations: findMethod assertSame getReturnType findMethod assertSame getReturnType findMethod assertSame getParameterTypes findMethod assertSame getParameterTypes
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void shouldFindMethodCorrectly()
focal_class.file: server-core/src/main/java/io/onedev/server/util/ReflectionUtils.java
focal_class.identifier: ReflectionUtils
focal_class.class_method_signature: ReflectionUtils.getTypeArguments(Class<T> baseClass, Class<? extends T> childClass)
focal_class.full_signature: public static List<Class<?>> getTypeArguments(Class<T> baseClass, Class<? extends T> childClass)
focal_class.identifier: getTypeArguments
focal_class.modifiers: public static
focal_class.parameters: (Class<T> baseClass, Class<? extends T> childClass)
focal_class.return: List<Class<?>>
focal_class.signature: List<Class<?>> getTypeArguments(Class<T> baseClass, Class<? extends T> childClass)
focal_class.class_method_signature: ReflectionUtils.getClass(Type type)
focal_class.full_signature: private static Class<?> getClass(Type type)
focal_class.identifier: getClass
focal_class.modifiers: private static
focal_class.parameters: (Type type)
focal_class.return: Class<?>
focal_class.signature: Class<?> getClass(Type type)
focal_class.class_method_signature: ReflectionUtils.findMethod(Class<?> clazz, String methodName, Class<?>... paramTypes)
focal_class.full_signature: public static Method findMethod(Class<?> clazz, String methodName, Class<?>... paramTypes)
focal_class.identifier: findMethod
focal_class.modifiers: public static
focal_class.parameters: (Class<?> clazz, String methodName, Class<?>... paramTypes)
focal_class.return: Method
focal_class.signature: Method findMethod(Class<?> clazz, String methodName, Class<?>... paramTypes)
focal_class.class_method_signature: ReflectionUtils.findField(Class<?> clazz, String fieldName)
focal_class.full_signature: public static Field findField(Class<?> clazz, String fieldName)
focal_class.identifier: findField
focal_class.modifiers: public static
focal_class.parameters: (Class<?> clazz, String fieldName)
focal_class.return: Field
focal_class.signature: Field findField(Class<?> clazz, String fieldName)
focal_class.class_method_signature: ReflectionUtils.findFields(Class<?> clazz)
focal_class.full_signature: public static List<Field> findFields(Class<?> clazz)
focal_class.identifier: findFields
focal_class.modifiers: public static
focal_class.parameters: (Class<?> clazz)
focal_class.return: List<Field>
focal_class.signature: List<Field> findFields(Class<?> clazz)
focal_class.class_method_signature: ReflectionUtils.getMethod(Class<?> clazz, String methodName, Class<?>...paramTypes)
focal_class.full_signature: public static Method getMethod(Class<?> clazz, String methodName, Class<?>...paramTypes)
focal_class.identifier: getMethod
focal_class.modifiers: public static
focal_class.parameters: (Class<?> clazz, String methodName, Class<?>...paramTypes)
focal_class.return: Method
focal_class.signature: Method getMethod(Class<?> clazz, String methodName, Class<?>...paramTypes)
focal_class.class_method_signature: ReflectionUtils.invokeStaticMethod(Class<?> clazz, String methodName, Object...params)
focal_class.full_signature: public static Object invokeStaticMethod(Class<?> clazz, String methodName, Object...params)
focal_class.identifier: invokeStaticMethod
focal_class.modifiers: public static
focal_class.parameters: (Class<?> clazz, String methodName, Object...params)
focal_class.return: Object
focal_class.signature: Object invokeStaticMethod(Class<?> clazz, String methodName, Object...params)
focal_class.class_method_signature: ReflectionUtils.invokeMethod(Object object, String methodName, Object...params)
focal_class.full_signature: public static Object invokeMethod(Object object, String methodName, Object...params)
focal_class.identifier: invokeMethod
focal_class.modifiers: public static
focal_class.parameters: (Object object, String methodName, Object...params)
focal_class.return: Object
focal_class.signature: Object invokeMethod(Object object, String methodName, Object...params)
focal_class.class_method_signature: ReflectionUtils.instantiateClass(Class<T> clazz, Object... params)
focal_class.full_signature: public static T instantiateClass(Class<T> clazz, Object... params)
focal_class.identifier: instantiateClass
focal_class.modifiers: public static
focal_class.parameters: (Class<T> clazz, Object... params)
focal_class.return: T
focal_class.signature: T instantiateClass(Class<T> clazz, Object... params)
focal_class.class_method_signature: ReflectionUtils.findConstructor(Class<T> clazz, Class<?>... expectedParamTypes)
focal_class.full_signature: @SuppressWarnings("unchecked") public static Constructor<T> findConstructor(Class<T> clazz, Class<?>... expectedParamTypes)
focal_class.identifier: findConstructor
focal_class.modifiers: @SuppressWarnings("unchecked") public static
focal_class.parameters: (Class<T> clazz, Class<?>... expectedParamTypes)
focal_class.return: Constructor<T>
focal_class.signature: Constructor<T> findConstructor(Class<T> clazz, Class<?>... expectedParamTypes)
focal_class.class_method_signature: ReflectionUtils.getCollectionElementType(Type type)
focal_class.full_signature: public static Class<?> getCollectionElementType(Type type)
focal_class.identifier: getCollectionElementType
focal_class.modifiers: public static
focal_class.parameters: (Type type)
focal_class.return: Class<?>
focal_class.signature: Class<?> getCollectionElementType(Type type)
focal_class.class_method_signature: ReflectionUtils.getMapKeyType(Type type)
focal_class.full_signature: public static Class<?> getMapKeyType(Type type)
focal_class.identifier: getMapKeyType
focal_class.modifiers: public static
focal_class.parameters: (Type type)
focal_class.return: Class<?>
focal_class.signature: Class<?> getMapKeyType(Type type)
focal_class.class_method_signature: ReflectionUtils.getMapValueType(Type type)
focal_class.full_signature: public static Class<?> getMapValueType(Type type)
focal_class.identifier: getMapValueType
focal_class.modifiers: public static
focal_class.parameters: (Type type)
focal_class.return: Class<?>
focal_class.signature: Class<?> getMapValueType(Type type)
focal_method.body: public static Method findMethod(Class<?> clazz, String methodName, Class<?>... paramTypes) {
  		Class<?> current = clazz;
  		while (true) {
  			try {
  				return current.getDeclaredMethod(methodName, paramTypes);
  			} catch (SecurityException e) {
  				throw new RuntimeException(e);
  			} catch (NoSuchMethodException e) {
  				// ignore
  			}
  			if (current == Object.class)
  				break;
  			current = current.getSuperclass();
  		}
  		
  		return null;
  	}
focal_method.class_method_signature: ReflectionUtils.findMethod(Class<?> clazz, String methodName, Class<?>... paramTypes)
focal_method.full_signature: public static Method findMethod(Class<?> clazz, String methodName, Class<?>... paramTypes)
focal_method.identifier: findMethod
focal_method.invocations: getDeclaredMethod getSuperclass
focal_method.modifiers: public static
focal_method.parameters: (Class<?> clazz, String methodName, Class<?>... paramTypes)
focal_method.return: Method
focal_method.signature: Method findMethod(Class<?> clazz, String methodName, Class<?>... paramTypes)