Class Index
java.lang.Object
org.jvnet.hudson.annotation_indexer.Index
- Author:
- Kohsuke Kawaguchi
-
Method Summary
Modifier and TypeMethodDescriptionstatic Iterable<AnnotatedElement>
list
(Class<? extends Annotation> type, ClassLoader cl) Lists up all the elements annotated by the given annotation.static <T extends AnnotatedElement>
Iterable<T>list
(Class<? extends Annotation> type, ClassLoader cl, Class<T> subType) Lists up all the elements annotated by the given annotation and of the givenAnnotatedElement
subtype.listClassNames
(Class<? extends Annotation> type, ClassLoader cl) Lists the names of classes annotated by the given annotation.
-
Method Details
-
list
public static <T extends AnnotatedElement> Iterable<T> list(Class<? extends Annotation> type, ClassLoader cl, Class<T> subType) throws IOException Lists up all the elements annotated by the given annotation and of the givenAnnotatedElement
subtype.- Throws:
IOException
-
listClassNames
public static Set<String> listClassNames(Class<? extends Annotation> type, ClassLoader cl) throws IOException Lists the names of classes annotated by the given annotation. Typically you should uselist(Class, ClassLoader, Class)
instead, but this lower-level method can be used for clients doing bytecode inspection or manipulation rather than class loading.- Throws:
IOException
-
list
public static Iterable<AnnotatedElement> list(Class<? extends Annotation> type, ClassLoader cl) throws IOException Lists up all the elements annotated by the given annotation.- Throws:
IOException
-