Class Index
- java.lang.Object
-
- org.jvnet.hudson.annotation_indexer.Index
-
public class Index extends Object
- Author:
- Kohsuke Kawaguchi
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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.static Set<String>
listClassNames(Class<? extends Annotation> type, ClassLoader cl)
Lists the names of classes annotated by the given annotation.
-
-
-
Method Detail
-
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
-
-