com.epam.jdi.light.elements.pageobjects.annotations.objects.FillFromAnnotationRules Maven / Gradle / Ivy
package com.epam.jdi.light.elements.pageobjects.annotations.objects;
import java.lang.reflect.Field;
import static com.epam.jdi.light.elements.pageobjects.annotations.WebAnnotationsUtil.hasAnnotation;
import static com.epam.jdi.tools.ReflectionUtils.isInterface;
/**
* Created by Roman Iovlev on 14.02.2018
* Email: [email protected]; Skype: roman.iovlev
*/
public class FillFromAnnotationRules {
public static boolean fieldHasAnnotation(Field field, Class annotationClass, Class interfaceClass) {
boolean isAnnotation = hasAnnotation(field, annotationClass);
return isAnnotation && isInterface(field, interfaceClass);
}
}