devutility.internal.lang.reflect.FieldUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of devutility.internal Show documentation
Show all versions of devutility.internal Show documentation
Utilities for Java development
package devutility.internal.lang.reflect;
import java.lang.annotation.Annotation;
import java.lang.reflect.Field;
import java.util.List;
/**
*
* FieldUtils
*
* @author: Aldwin Su
* @version: 2019-12-09 23:32:11
*/
public class FieldUtils {
/**
* Return Order value by provided Field object. If no Order setting, 0 will return.
* @param field Field object.
* @return int
*/
public static int getOrder(Field field) {
return AccessibleObjectUtils.getOrder(field);
}
/**
* Check whether provided Field object contains annotations or not?
* @param field Field object.
* @param annotations Annotations want to check.
* @return boolean
*/
public static boolean containAnnotations(Field field, List annotations) {
return AccessibleObjectUtils.containAnnotations(field, annotations);
}
/**
* Check whether provided Field object contains annotations or not?
* @param field Field object.
* @param annotationClasses Class objects of Annotations want to check.
* @return boolean
*/
public static boolean containAnnotationClasses(Field field, List> annotationClasses) {
return AccessibleObjectUtils.containAnnotationClasses(field, annotationClasses);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy