com.badlogic.gdx.utils.reflect.Annotation Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of backend-teavm Show documentation
Show all versions of backend-teavm Show documentation
Tool to generate libgdx to javascript using teaVM
package com.badlogic.gdx.utils.reflect;
/**
* Provides information about, and access to, an annotation of a field, class or interface.
*
* @author dludwig
*/
public final class Annotation {
private java.lang.annotation.Annotation annotation;
Annotation(java.lang.annotation.Annotation annotation) {
this.annotation = annotation;
}
@SuppressWarnings("unchecked")
public T getAnnotation(Class annotationType) {
if(annotation.annotationType().equals(annotationType)) {
return (T)annotation;
}
return null;
}
public Class extends java.lang.annotation.Annotation> getAnnotationType() {
return annotation.annotationType();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy