public ClassMethodInspector(final Class< ? > clazz, ClassToGenericClassConverter converter) throws IOException { Method[] methods = clazz.getDeclaredMethods(); for ( int i = 0; i < methods.length; i++ ) { Method aMethod = methods[i]; int modifiers = methods[i].getModifiers(); String methodName = aMethod.getName(); if ( isNotGetterOrSetter(aMethod) && isReasonableMethod( clazz, methodName ) && Modifier.isPublic( modifiers ) ) { Class<?>[] listParam = aMethod.getParameterTypes(); MethodInfo info = new MethodInfo(methodName, solveParams(listParam), aMethod.getReturnType(), SuggestionCompletionEngineBuilder .obtainGenericType(aMethod.getGenericReturnType()), converter.translateClassToGenericType(clazz)); this.methods.add(info); } } }
public ClassMethodInspector(final Class< ? > clazz, ClassToGenericClassConverter converter) throws IOException { Method[] methods = clazz.getDeclaredMethods(); for ( int i = 0; i < methods.length; i++ ) { Method aMethod = methods[i]; int modifiers = methods[i].getModifiers(); String methodName = aMethod.getName(); if ( isNotGetterOrSetter(aMethod) && isReasonableMethod( clazz, methodName ) && Modifier.isPublic( modifiers ) ) { Class<?>[] listParam = aMethod.getParameterTypes(); MethodInfo info = new MethodInfo(methodName, solveParams(listParam), aMethod.getReturnType(), SuggestionCompletionEngineBuilder .obtainGenericType(aMethod.getGenericReturnType()), converter.translateClassToGenericType(clazz)); this.methods.add(info); } } }