
com.moon.core.lang.annotation.AnnotationUtil Maven / Gradle / Ivy
package com.moon.core.lang.annotation;
import java.lang.annotation.Annotation;
import java.lang.reflect.AnnotatedElement;
import java.util.Objects;
import static com.moon.core.lang.ThrowUtil.noInstanceError;
/**
* @author moonsky
*/
public final class AnnotationUtil {
private AnnotationUtil() { noInstanceError(); }
public static boolean
isAnnotationPresent(AnnotatedElement ae, Class annotationType) { return ae.isAnnotationPresent(annotationType); }
public static T
get(AnnotatedElement ae, Class annotationType) { return ae.getAnnotation(annotationType); }
public static boolean equals(A a1, A a2) { return Objects.equals(a1, a2); }
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy