All Downloads are FREE. Search and download functionalities are using the official Maven repository.

devutility.internal.lang.reflect.FieldUtils Maven / Gradle / Ivy

There is a newer version: 1.3.8.1
Show newest version
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