|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.java.sezpoz.Index<A,I>
public final class Index<A extends java.lang.annotation.Annotation,I>
Represents an index of a single annotation. Indices are not automatically cached (but reading them should be pretty cheap anyway).
Method Summary | ||
---|---|---|
java.util.Iterator<IndexItem<A,I>> |
iterator()
Find all items in the index. |
|
static
|
load(java.lang.Class<A> annotation,
java.lang.Class<I> instanceType)
Load an index for a given annotation type. |
|
static
|
load(java.lang.Class<A> annotation,
java.lang.Class<I> instanceType,
java.lang.ClassLoader loader)
Load an index for a given annotation type. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static <A extends java.lang.annotation.Annotation,I> Index<A,I> load(java.lang.Class<A> annotation, java.lang.Class<I> instanceType) throws java.lang.IllegalArgumentException
annotation
- the type of annotation to findinstanceType
- the type of instance to be created (use Void
if all instances will be null)
java.lang.IllegalArgumentException
- if the annotation type is not marked with Indexable
or the instance type is not equal to or a supertype of the annotation's actual Indexable.type()
public static <A extends java.lang.annotation.Annotation,I> Index<A,I> load(java.lang.Class<A> annotation, java.lang.Class<I> instanceType, java.lang.ClassLoader loader) throws java.lang.IllegalArgumentException
annotation
- the type of annotation to findinstanceType
- the type of instance to be created (use Void
if all instances will be null)loader
- a class loader in which to find the index and any annotated classes
java.lang.IllegalArgumentException
- if the annotation type is not marked with Indexable
or the instance type is not equal to or a supertype of the annotation's actual Indexable.type()
public java.util.Iterator<IndexItem<A,I>> iterator()
IndexError
as the index is parsed lazily.
iterator
in interface java.lang.Iterable<IndexItem<A extends java.lang.annotation.Annotation,I>>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |