All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.flextrade.jfixture.utility.comparators.MethodParameterCountComparator Maven / Gradle / Ivy

Go to download

JFixture is an open source library based on the popular .NET library, AutoFixture

There is a newer version: 2.7.2
Show newest version
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);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy