public class ValueCheckerUtils extends Object
| Constructor and Description | 
|---|
ValueCheckerUtils()  | 
| Modifier and Type | Method and Description | 
|---|---|
static Class<?> | 
getArrayClassObject(TypeMirror componentType)  | 
static Class<?> | 
getClassFromType(TypeMirror type)  | 
static List<Integer> | 
getLengthsForStringValues(List<String> values)
Gets a list of lengths for a list of string values. 
 | 
static Range | 
getRangeFromValues(List<? extends Number> values)
Get the minimum and maximum of a list and return a range bounded by them. 
 | 
static List<?> | 
getValuesCastedToType(AnnotationMirror anno,
                     TypeMirror castTo)
Get a list of values of annotation, and then cast them to a given type 
 | 
static <T> List<T> | 
getValuesFromRange(Range range,
                  Class<T> expectedType)
Get all possible values from the given type and cast them into a boxed primitive type. 
 | 
static <T extends Comparable<T>> | 
removeDuplicates(List<T> values)  | 
public static Class<?> getClassFromType(TypeMirror type)
public static Class<?> getArrayClassObject(TypeMirror componentType)
public static List<?> getValuesCastedToType(AnnotationMirror anno, TypeMirror castTo)
anno - the annotation that contains valuescastTo - the type that is casted topublic static Range getRangeFromValues(List<? extends Number> values)
public static <T> List<T> getValuesFromRange(Range range, Class<T> expectedType)
expectedType must be a boxed type, not a primitive type, because primitive types
 cannot be stored in a list.
range - the given rangeexpectedType - the expected typepublic static <T extends Comparable<T>> List<T> removeDuplicates(List<T> values)