com.flextrade.jfixture.utility.comparators.MethodParameterCountComparator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jfixture Show documentation
Show all versions of jfixture Show documentation
JFixture is an open source library based on the popular .NET library, AutoFixture
package com.flextrade.jfixture.utility.comparators;
import java.lang.reflect.Method;
import java.util.Comparator;
public class MethodParameterCountComparator implements Comparator {
@Override
public int compare(Method method1, Method method2) {
Integer method1Parameters = method1.getGenericParameterTypes().length;
Integer method2Parameters = method2.getGenericParameterTypes().length;
return method1Parameters.compareTo(method2Parameters);
}
}