
refutils.util.FieldComparator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of reflection-utils Show documentation
Show all versions of reflection-utils Show documentation
A utility library to handle Java reflection with ease
The newest version!
package refutils.util;
import java.lang.reflect.Field;
import java.util.Comparator;
/**
* @author bjorn
* @since 2013-10-07
*/
class FieldComparator implements Comparator {
@Override
public int compare(Field field, Field field2) {
int compare = field.getName().compareTo(field2.getName());
if (compare != 0) {
return compare;
}
return field.getType().getName().compareTo(field.getType().getName());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy