001 package net.sourceforge.retroweaver.runtime.java.lang.reflect;
002
003 import net.sourceforge.retroweaver.runtime.java.lang.annotation.*;
004
005 public interface AnnotatedElement {
006
007 // Returns this element's annotation for the specified type if such an
008 // annotation is present, else null.
009 <T extends Annotation> T getAnnotation(Class<T> annotationType);
010
011 // Returns all annotations present on this element.
012 Annotation[] getAnnotations();
013
014 // Returns all annotations that are directly present on this element.
015 Annotation[] getDeclaredAnnotations();
016
017 // Returns true if an annotation for the specified type is present on this
018 // element, else false.
019 boolean isAnnotationPresent(Class<? extends Annotation> annotationType);
020
021 }