com.g2forge.alexandria.java.annotation.HAnnotation Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ax-java Show documentation
Show all versions of ax-java Show documentation
Standard Java library and the basis of the ${alexandria.name} project.
package com.g2forge.alexandria.java.annotation;
import java.lang.annotation.Annotation;
import com.g2forge.alexandria.java.marker.Helpers;
import lombok.experimental.UtilityClass;
@Helpers
@UtilityClass
public class HAnnotation {
/**
* Get the annotations on an annotation itself. This is necessary because annotations on annotations don't translate through the dynamic proxy the JVM
* generates.
*
* @param annotation The annotation to get the annotations on.
* @return Any annotations on the annotation
.
*/
public static Class> getAnnotationsOnAnnotation(Annotation annotation) {
return annotation.getClass().getInterfaces()[0];
}
}