public final class Utils extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
checkArgument(boolean expression,
Object errorMessage) |
static <T> T |
checkNotNull(T reference,
Object errorMessage) |
static <T> List<Field> |
findOneAndOnlyFieldForAnnotation(Class<? extends Object> classContainingField,
Class<? extends Annotation> annotation,
Class<T> fieldType)
Will look in the test class to find a field of type 'fieldType' annotated with 'annotation'
|
static Object |
instantiate(Class<?> classToInstatiate) |
static EqualsHashCodeValidator |
toEqualsHashCodeValidator(Class<?> classToCast) |
static ObjectValidationRulesCollection |
toRulesCollection(Class<?> classToCast) |
static ObjectValidationRulesCollection |
toRulesCollection(String rulesClassName) |
public static <T> List<Field> findOneAndOnlyFieldForAnnotation(Class<? extends Object> classContainingField, Class<? extends Annotation> annotation, Class<T> fieldType)
classContainingField - annotation - fieldType - IllegalStateException - if there was an error retrieving the field.public static ObjectValidationRulesCollection toRulesCollection(String rulesClassName)
public static EqualsHashCodeValidator toEqualsHashCodeValidator(Class<?> classToCast)
public static ObjectValidationRulesCollection toRulesCollection(Class<?> classToCast)
public static <T> T checkNotNull(T reference,
Object errorMessage)
public static void checkArgument(boolean expression,
Object errorMessage)
Copyright © 2013. All Rights Reserved.