Top Description Fields Constructors Methods
org.jboss.jandex

pack-priv final Class IndexReaderV2

extends IndexReaderImpl
Class Inheritance
Imports
java.io.IOException, java.lang.reflect.Modifier, java.util.ArrayList, .Arrays, .Collections, .HashMap, .HashSet, .IdentityHashMap, .List, .Map, .Map.Entry, .Set

Reads a Jandex index file and returns the saved index. See 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.
Author
Jason T. Greene

Field Summary

Modifier and TypeField and Description
private AnnotationInstance[]
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private byte[][]
private static final byte
private static final byte
private static final byte
private static final byte
private FieldInternal[]
private static final int
private final PackedDataInputStream
pack-priv static final int
private static final byte
private static final byte
private static final byte
private MethodInternal[]
pack-priv static final int
private DotName[]
private static final byte
private static final byte
private RecordComponentInternal[]
private String[]
private static final byte
private static final byte
private static final byte
private Type[][]
private Type[]
private HashMap<DotName, Set<DotName>>
private final int

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
private void
private void
addToMaster(Map<DotName, List<AnnotationInstance>> masterAnnotations, DotName name, List<AnnotationInstance> annotations)

private List<AnnotationInstance>
convertToList(AnnotationInstance[] annotationInstances)

private int
findNextNull(Object[] array, int start)

pack-priv Index
private AnnotationInstance
private AnnotationInstance[]
private AnnotationTarget
private AnnotationValue
private AnnotationValue[]
private void
private ClassInfo
private Index
readClasses(PackedDataInputStream stream, int annotationsSize, int implementorsSize, int subinterfacesSize, int subclassesSize)

private FieldInternal[]
private MethodInternal[]
private RecordComponentInternal[]
private List<DotName>
private ClassInfo.EnclosingMethodInfo
private FieldInternal
private void
private MethodInternal
private void
private ModuleInfo
private Map<DotName, ModuleInfo>
private void
private RecordComponentInternal
private void
private void
private Type
private Type[]
private Type[]
private void
private void
private void
readUsers(PackedDataInputStream stream, int usersSize)

private void

Field Detail

annotationTableback to summary
private AnnotationInstance[] annotationTable
AVALUE_ARRAYback to summary
private static final int AVALUE_ARRAY
AVALUE_BOOLEANback to summary
private static final int AVALUE_BOOLEAN
AVALUE_BYTEback to summary
private static final int AVALUE_BYTE
AVALUE_CHARback to summary
private static final int AVALUE_CHAR
AVALUE_CLASSback to summary
private static final int AVALUE_CLASS
AVALUE_DOUBLEback to summary
private static final int AVALUE_DOUBLE
AVALUE_ENUMback to summary
private static final int AVALUE_ENUM
AVALUE_FLOATback to summary
private static final int AVALUE_FLOAT
AVALUE_INTback to summary
private static final int AVALUE_INT
AVALUE_LONGback to summary
private static final int AVALUE_LONG
AVALUE_NESTEDback to summary
private static final int AVALUE_NESTED
AVALUE_SHORTback to summary
private static final int AVALUE_SHORT
AVALUE_STRINGback to summary
private static final int AVALUE_STRING
byteTableback to summary
private byte[][] byteTable
CLASS_EXTENDS_TYPE_TAGback to summary
private static final byte CLASS_EXTENDS_TYPE_TAG
CLASS_TAGback to summary
private static final byte CLASS_TAG
EMPTY_TYPE_TAGback to summary
private static final byte EMPTY_TYPE_TAG
FIELD_TAGback to summary
private static final byte FIELD_TAG
fieldTableback to summary
private FieldInternal[] fieldTable
HAS_ENCLOSING_METHODback to summary
private static final int HAS_ENCLOSING_METHOD
inputback to summary
private final PackedDataInputStream input
MAX_VERSIONback to summary
pack-priv static final int MAX_VERSION
METHOD_PARAMETER_TAGback to summary
private static final byte METHOD_PARAMETER_TAG
METHOD_PARAMETER_TYPE_TAGback to summary
private static final byte METHOD_PARAMETER_TYPE_TAG
METHOD_TAGback to summary
private static final byte METHOD_TAG
methodTableback to summary
private MethodInternal[] methodTable
MIN_VERSIONback to summary
pack-priv static final int MIN_VERSION
nameTableback to summary
private DotName[] nameTable
NULL_TARGET_TAGback to summary
private static final byte NULL_TARGET_TAG
RECORD_COMPONENT_TAGback to summary
private static final byte RECORD_COMPONENT_TAG
recordComponentTableback to summary
private RecordComponentInternal[] recordComponentTable
stringTableback to summary
private String[] stringTable
THROWS_TYPE_TAGback to summary
private static final byte THROWS_TYPE_TAG
TYPE_PARAMETER_BOUND_TAGback to summary
private static final byte TYPE_PARAMETER_BOUND_TAG
TYPE_PARAMETER_TAGback to summary
private static final byte TYPE_PARAMETER_TAG
typeListTableback to summary
private Type[][] typeListTable
typeTableback to summary
private Type[] typeTable
usersback to summary
private HashMap<DotName, Set<DotName>> users
versionback to summary
private final int version

Constructor Detail

IndexReaderV2back to summary
pack-priv IndexReaderV2(PackedDataInputStream input, int version)

Method Detail

addClassToMapback to summary
private void addClassToMap(HashMap<DotName, List<ClassInfo>> map, DotName name, ClassInfo currentClass)
addToMasterback to summary
private void addToMaster(Map<DotName, List<AnnotationInstance>> masterAnnotations, DotName name, List<AnnotationInstance> annotations)
convertToListback to summary
private List<AnnotationInstance> convertToList(AnnotationInstance[] annotationInstances)
findNextNullback to summary
private int findNextNull(Object[] array, int start)
readback to summary
pack-priv Index read() throws IOException

Implements abstract org.jboss.jandex.IndexReaderImpl.read.

readAnnotationEntryback to summary
private AnnotationInstance readAnnotationEntry(PackedDataInputStream stream, AnnotationTarget caller) throws IOException
readAnnotationsback to summary
private AnnotationInstance[] readAnnotations(PackedDataInputStream stream, AnnotationTarget target) throws IOException
readAnnotationTargetback to summary
private AnnotationTarget readAnnotationTarget(PackedDataInputStream stream, AnnotationTarget caller) throws IOException
readAnnotationValueback to summary
private AnnotationValue readAnnotationValue(PackedDataInputStream stream) throws IOException
readAnnotationValuesback to summary
private AnnotationValue[] readAnnotationValues(PackedDataInputStream stream) throws IOException
readByteTableback to summary
private void readByteTable(PackedDataInputStream stream) throws IOException
readClassEntryback to summary
private ClassInfo readClassEntry(PackedDataInputStream stream, Map<DotName, List<AnnotationInstance>> masterAnnotations) throws IOException
readClassesback to summary
private Index readClasses(PackedDataInputStream stream, int annotationsSize, int implementorsSize, int subinterfacesSize, int subclassesSize) throws IOException
readClassFieldsback to summary
private FieldInternal[] readClassFields(PackedDataInputStream stream, ClassInfo clazz) throws IOException
readClassMethodsback to summary
private MethodInternal[] readClassMethods(PackedDataInputStream stream, ClassInfo clazz) throws IOException
readClassRecordComponentsback to summary
private RecordComponentInternal[] readClassRecordComponents(PackedDataInputStream stream, ClassInfo clazz) throws IOException
readDotNamesback to summary
private List<DotName> readDotNames(PackedDataInputStream stream) throws IOException
readEnclosingMethodback to summary
private ClassInfo.EnclosingMethodInfo readEnclosingMethod(PackedDataInputStream stream) throws IOException
readFieldEntryback to summary
private FieldInternal readFieldEntry(PackedDataInputStream stream) throws IOException
readFieldTableback to summary
private void readFieldTable(PackedDataInputStream stream) throws IOException
readMethodEntryback to summary
private MethodInternal readMethodEntry(PackedDataInputStream stream) throws IOException
readMethodTableback to summary
private void readMethodTable(PackedDataInputStream stream) throws IOException
readModuleEntryback to summary
private ModuleInfo readModuleEntry(PackedDataInputStream stream, ClassInfo moduleInfoClass) throws IOException
readModulesback to summary
private Map<DotName, ModuleInfo> readModules(PackedDataInputStream stream, Map<DotName, List<AnnotationInstance>> masterAnnotations) throws IOException
readNameTableback to summary
private void readNameTable(PackedDataInputStream stream) throws IOException
readRecordComponentEntryback to summary
private RecordComponentInternal readRecordComponentEntry(PackedDataInputStream stream) throws IOException
readRecordComponentTableback to summary
private void readRecordComponentTable(PackedDataInputStream stream) throws IOException
readStringTableback to summary
private void readStringTable(PackedDataInputStream stream) throws IOException
readTypeEntryback to summary
private Type readTypeEntry(PackedDataInputStream stream, Map<TypeVariableReference, Integer> references) throws IOException
readTypeListEntryback to summary
private Type[] readTypeListEntry(PackedDataInputStream stream) throws IOException
readTypeListReferenceback to summary
private Type[] readTypeListReference(PackedDataInputStream stream) throws IOException
readTypeListTableback to summary
private void readTypeListTable(PackedDataInputStream stream) throws IOException
readTypeTableback to summary
private void readTypeTable(PackedDataInputStream stream) throws IOException
readUsersback to summary
private void readUsers(PackedDataInputStream stream, int usersSize) throws IOException
updateAnnotationTargetInfoback to summary
private void updateAnnotationTargetInfo(AnnotationInstance[] annotations, ClassInfo clazz)