jadex.extension.rs.publish.MethodComparator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jadex-platform-webservice-grizzly Show documentation
Show all versions of jadex-platform-webservice-grizzly Show documentation
Provides webservice support via Grizzly.
The newest version!
package jadex.extension.rs.publish;
import java.lang.reflect.Method;
import java.util.Comparator;
/**
* Simple method comparator that can be used to
* order methods alphabetically.
*/
public class MethodComparator implements Comparator
{
public int compare(Method m1, Method m2)
{
int ret = m1.getName().compareTo(m2.getName());
if(ret==0)
{
ret = m1.getParameterTypes().length - m2.getParameterTypes().length;
if(ret==0)
{
ret = m1.toString().compareTo(m2.toString());
}
}
return ret;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy