aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/equalparts/cardbase/utils/Utils.java
blob: bb8839748b62bc0557b59ab6c33b78b41038c8d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package eu.equalparts.cardbase.utils;

import java.lang.annotation.Annotation;
import java.lang.reflect.Field;

public class Utils {
	public static boolean hasAnnotation(Field fieldToAnalyse, Class<? extends Annotation> annotation) {
		for (Annotation a : fieldToAnalyse.getAnnotations()) {
			if (a.annotationType().equals(annotation)) {
				return true;
			}
		}
		return false;
	}
}