public static Map<String, Pair<Method, Method>> getPropertySetterGetterMethods( Class<? extends Object> theClass ) { try { Method[] methods = theClass.getMethods(); Map<String, Pair<Method, Method>> methodMap = new LinkedHashMap<>( methods.length ); List<Method> getterMethodList = new ArrayList<>( methods.length ); for ( int index = 0; index < methods.length; index++ ) { Method method = methods[ index ]; if (extractPropertyInfoFromMethodPair(methodMap, getterMethodList, method)) continue; } for ( Method method : getterMethodList ) { extractProperty(methodMap, method); } return methodMap; } catch (Exception ex) { ex.printStackTrace(); return Exceptions.handle(Map.class, ex, theClass); } }
public static Map<String, Pair<Method, Method>> getPropertySetterGetterMethods( Class<? extends Object> theClass ) { try { Method[] methods = theClass.getMethods(); Map<String, Pair<Method, Method>> methodMap = new LinkedHashMap<>( methods.length ); List<Method> getterMethodList = new ArrayList<>( methods.length ); for ( int index = 0; index < methods.length; index++ ) { Method method = methods[ index ]; if (extractPropertyInfoFromMethodPair(methodMap, getterMethodList, method)) continue; } for ( Method method : getterMethodList ) { extractProperty(methodMap, method); } return methodMap; } catch (Exception ex) { ex.printStackTrace(); return Exceptions.handle(Map.class, ex, theClass); } }