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 IndexReaderImpl
java.io.IOException
private void readByteTable(PackedDataInputStream stream) throws java.io.IOException
java.io.IOException
private void readStringTable(PackedDataInputStream stream) throws java.io.IOException
java.io.IOException
private void readNameTable(PackedDataInputStream stream) throws java.io.IOException
java.io.IOException
private void readTypeTable(PackedDataInputStream stream) throws java.io.IOException
java.io.IOException
private int findNextNull(java.lang.Object[] array, int start)
private void readTypeListTable(PackedDataInputStream stream) throws java.io.IOException
java.io.IOException
private AnnotationInstance[] readAnnotations(PackedDataInputStream stream, AnnotationTarget target) throws java.io.IOException
java.io.IOException
private AnnotationValue[] readAnnotationValues(PackedDataInputStream stream) throws java.io.IOException
java.io.IOException
private AnnotationValue readAnnotationValue(PackedDataInputStream stream) throws java.io.IOException
java.io.IOException
private AnnotationInstance readAnnotationEntry(PackedDataInputStream stream, AnnotationTarget caller) throws java.io.IOException
java.io.IOException
private Type[] readTypeListReference(PackedDataInputStream stream) throws java.io.IOException
java.io.IOException
private Type[] readTypeListEntry(PackedDataInputStream stream) throws java.io.IOException
java.io.IOException
private Type readTypeEntry(PackedDataInputStream stream) throws java.io.IOException
java.io.IOException
private AnnotationTarget readAnnotationTarget(PackedDataInputStream stream, AnnotationTarget caller) throws java.io.IOException
java.io.IOException
private void readMethodTable(PackedDataInputStream stream, int version) throws java.io.IOException
java.io.IOException
private void readFieldTable(PackedDataInputStream stream) throws java.io.IOException
java.io.IOException
private MethodInternal readMethodEntry(PackedDataInputStream stream, int version) throws java.io.IOException
java.io.IOException
private FieldInternal readFieldEntry(PackedDataInputStream stream) throws java.io.IOException
java.io.IOException
private ClassInfo readClassEntry(PackedDataInputStream stream, java.util.Map<DotName,java.util.List<AnnotationInstance>> masterAnnotations, int version) throws java.io.IOException
java.io.IOException
private 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.IOException
private MethodInternal[] readClassMethods(PackedDataInputStream stream, ClassInfo clazz) throws java.io.IOException
java.io.IOException
private void updateAnnotationTargetInfo(AnnotationInstance[] annotations, ClassInfo clazz)
private ClassInfo.EnclosingMethodInfo readEnclosingMethod(PackedDataInputStream stream, int version) throws java.io.IOException
java.io.IOException
private Index readClasses(PackedDataInputStream stream, int annotationsSize, int implementorsSize, int subclassesSize, int version) throws java.io.IOException
java.io.IOException
int toDataVersion(int version)
toDataVersion
in class IndexReaderImpl