final class IndexReaderV2 extends IndexReaderImpl
Indexer
for a thorough description of how the Index data is produced.
An IndexReader loads the stream passed to it's constructor and applies the appropriate buffering. The Jandex index format is designed for efficient reading and low final memory storage.
Thread-Safety
IndexReader is not thread-safe and can not be shared between concurrent threads. The resulting index, however, is.| Modifier and Type | Field and Description |
|---|---|
private AnnotationInstance[] |
annotationTable |
private static int |
AVALUE_ARRAY |
private static int |
AVALUE_BOOLEAN |
private static int |
AVALUE_BYTE |
private static int |
AVALUE_CHAR |
private static int |
AVALUE_CLASS |
private static int |
AVALUE_DOUBLE |
private static int |
AVALUE_ENUM |
private static int |
AVALUE_FLOAT |
private static int |
AVALUE_INT |
private static int |
AVALUE_LONG |
private static int |
AVALUE_NESTED |
private static int |
AVALUE_SHORT |
private static int |
AVALUE_STRING |
private byte[][] |
byteTable |
private static byte |
CLASS_EXTENDS_TYPE_TAG |
private static byte |
CLASS_TAG |
private static byte |
EMPTY_TYPE_TAG |
private static byte |
FIELD_TAG |
private FieldInternal[] |
fieldTable |
private static int |
HAS_ENCLOSING_METHOD |
private static byte[] |
INIT_METHOD_NAME |
private PackedDataInputStream |
input |
(package private) static int |
MAX_DATA_VERSION |
(package private) static int |
MAX_VERSION |
private static byte |
METHOD_PARAMATER_TAG |
private static byte |
METHOD_PARAMETER_TYPE_TAG |
private static byte |
METHOD_TAG |
private MethodInternal[] |
methodTable |
(package private) static int |
MIN_VERSION |
private DotName[] |
nameTable |
private static byte |
NULL_TARGET_TAG |
private java.lang.String[] |
stringTable |
private static byte |
THROWS_TYPE_TAG |
private static byte |
TYPE_PARAMETER_BOUND_TAG |
private static byte |
TYPE_PARAMETER_TAG |
private Type[][] |
typeListTable |
private Type[] |
typeTable |
| Constructor and Description |
|---|
IndexReaderV2(PackedDataInputStream input) |
static final int MIN_VERSION
static final int MAX_VERSION
static final int MAX_DATA_VERSION
private static final byte NULL_TARGET_TAG
private static final byte FIELD_TAG
private static final byte METHOD_TAG
private static final byte METHOD_PARAMATER_TAG
private static final byte CLASS_TAG
private static final byte EMPTY_TYPE_TAG
private static final byte CLASS_EXTENDS_TYPE_TAG
private static final byte TYPE_PARAMETER_TAG
private static final byte TYPE_PARAMETER_BOUND_TAG
private static final byte METHOD_PARAMETER_TYPE_TAG
private static final byte THROWS_TYPE_TAG
private static final int AVALUE_BYTE
private static final int AVALUE_SHORT
private static final int AVALUE_INT
private static final int AVALUE_CHAR
private static final int AVALUE_FLOAT
private static final int AVALUE_DOUBLE
private static final int AVALUE_LONG
private static final int AVALUE_BOOLEAN
private static final int AVALUE_STRING
private static final int AVALUE_CLASS
private static final int AVALUE_ENUM
private static final int AVALUE_ARRAY
private static final int AVALUE_NESTED
private static final int HAS_ENCLOSING_METHOD
private static final byte[] INIT_METHOD_NAME
private PackedDataInputStream input
private byte[][] byteTable
private java.lang.String[] stringTable
private DotName[] nameTable
private Type[] typeTable
private Type[][] typeListTable
private AnnotationInstance[] annotationTable
private MethodInternal[] methodTable
private FieldInternal[] fieldTable
IndexReaderV2(PackedDataInputStream input)
Index read(int version) throws java.io.IOException
read in class IndexReaderImpljava.io.IOExceptionprivate void readByteTable(PackedDataInputStream stream) throws java.io.IOException
java.io.IOExceptionprivate void readStringTable(PackedDataInputStream stream) throws java.io.IOException
java.io.IOExceptionprivate void readNameTable(PackedDataInputStream stream) throws java.io.IOException
java.io.IOExceptionprivate void readTypeTable(PackedDataInputStream stream) throws java.io.IOException
java.io.IOExceptionprivate int findNextNull(java.lang.Object[] array,
int start)
private void readTypeListTable(PackedDataInputStream stream) throws java.io.IOException
java.io.IOExceptionprivate AnnotationInstance[] readAnnotations(PackedDataInputStream stream, AnnotationTarget target) throws java.io.IOException
java.io.IOExceptionprivate AnnotationValue[] readAnnotationValues(PackedDataInputStream stream) throws java.io.IOException
java.io.IOExceptionprivate AnnotationInstance readAnnotationEntry(PackedDataInputStream stream, AnnotationTarget caller) throws java.io.IOException
java.io.IOExceptionprivate Type[] readTypeListReference(PackedDataInputStream stream) throws java.io.IOException
java.io.IOExceptionprivate Type[] readTypeListEntry(PackedDataInputStream stream) throws java.io.IOException
java.io.IOExceptionprivate Type readTypeEntry(PackedDataInputStream stream) throws java.io.IOException
java.io.IOExceptionprivate AnnotationTarget readAnnotationTarget(PackedDataInputStream stream, AnnotationTarget caller) throws java.io.IOException
java.io.IOExceptionprivate void readMethodTable(PackedDataInputStream stream) throws java.io.IOException
java.io.IOExceptionprivate void readFieldTable(PackedDataInputStream stream) throws java.io.IOException
java.io.IOExceptionprivate MethodInternal readMethodEntry(PackedDataInputStream stream) throws java.io.IOException
java.io.IOExceptionprivate FieldInternal readFieldEntry(PackedDataInputStream stream) throws java.io.IOException
java.io.IOExceptionprivate ClassInfo readClassEntry(PackedDataInputStream stream, java.util.Map<DotName,java.util.List<AnnotationInstance>> masterAnnotations) throws java.io.IOException
java.io.IOExceptionprivate void addToMaster(java.util.Map<DotName,java.util.List<AnnotationInstance>> masterAnnotations, DotName name, java.util.List<AnnotationInstance> annotations)
private java.util.List<AnnotationInstance> convertToList(AnnotationInstance[] annotationInstances)
private void addClassToMap(java.util.HashMap<DotName,java.util.List<ClassInfo>> map, DotName name, ClassInfo currentClass)
private FieldInternal[] readClassFields(PackedDataInputStream stream, ClassInfo clazz) throws java.io.IOException
java.io.IOExceptionprivate MethodInternal[] readClassMethods(PackedDataInputStream stream, ClassInfo clazz) throws java.io.IOException
java.io.IOExceptionprivate void updateAnnotationTargetInfo(AnnotationInstance[] annotations, ClassInfo clazz)
private ClassInfo.EnclosingMethodInfo readEnclosingMethod(PackedDataInputStream stream) throws java.io.IOException
java.io.IOExceptionprivate Index readClasses(PackedDataInputStream stream, int annotationsSize, int implementorsSize, int subclassesSize) throws java.io.IOException
java.io.IOExceptionint toDataVersion(int version)
toDataVersion in class IndexReaderImpl