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

com.g2forge.alexandria.java.annotation.HAnnotation Maven / Gradle / Ivy

There is a newer version: 0.0.18
Show newest version
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];
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy