Package uk.co.jemos.podam.common
Class AbstractConstructorComparator
- java.lang.Object
-
- uk.co.jemos.podam.common.AbstractConstructorComparator
-
- All Implemented Interfaces:
Comparator<Constructor<?>>
- Direct Known Subclasses:
ConstructorHeavyFirstComparator,ConstructorLightFirstComparator
public abstract class AbstractConstructorComparator extends Object implements Comparator<Constructor<?>>
It provides a comparator to sort the constructor to choose first.The priority goes to constructors with the
PodamConstructorannotation first, and then to those with less arguments.- Author:
- daivanov
-
-
Constructor Summary
Constructors Constructor Description AbstractConstructorComparator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareAnnotations(Constructor<?> constructor1, Constructor<?> constructor2)intconstructorComplexity(Constructor<?> constructor)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Comparator
compare, equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
-
-
-
Method Detail
-
constructorComplexity
public int constructorComplexity(Constructor<?> constructor)
-
compareAnnotations
public int compareAnnotations(Constructor<?> constructor1, Constructor<?> constructor2)
-
-