/** * Parses an annotation attribute, per se. * * @param visibility {@code non-null;} visibility of the parsed annotations * @return {@code non-null;} the list of annotations read from the attribute * data */ public Annotations parseAnnotationAttribute( AnnotationVisibility visibility) { Annotations result; try { result = parseAnnotations(visibility); if (input.available() != 0) { throw new ParseException("extra data in attribute"); } } catch (IOException ex) { // ByteArray.MyDataInputStream should never throw. throw new RuntimeException("shouldn't happen", ex); } return result; }
int tag = input.readUnsignedByte(); int classInfoIndex = input.readUnsignedShort(); CstUtf8 value = (CstUtf8) pool.get(classInfoIndex); Type type = Type.internReturnType(value.getString()); requireLength(4); int typeNameIndex = input.readUnsignedShort(); int constNameIndex = input.readUnsignedShort(); CstUtf8 typeName = (CstUtf8) pool.get(typeNameIndex); CstUtf8 constName = (CstUtf8) pool.get(constNameIndex); requireLength(2); int numValues = input.readUnsignedShort(); CstArray.List list = new CstArray.List(numValues);
int tag = input.readUnsignedByte(); int classInfoIndex = input.readUnsignedShort(); CstString value = (CstString) pool.get(classInfoIndex); Type type = Type.internReturnType(value.getString()); requireLength(4); int typeNameIndex = input.readUnsignedShort(); int constNameIndex = input.readUnsignedShort(); CstString typeName = (CstString) pool.get(typeNameIndex); CstString constName = (CstString) pool.get(constNameIndex); requireLength(2); int numValues = input.readUnsignedShort(); CstArray.List list = new CstArray.List(numValues);
int tag = input.readUnsignedByte(); int classInfoIndex = input.readUnsignedShort(); CstString value = (CstString) pool.get(classInfoIndex); Type type = Type.internReturnType(value.getString()); requireLength(4); int typeNameIndex = input.readUnsignedShort(); int constNameIndex = input.readUnsignedShort(); CstString typeName = (CstString) pool.get(typeNameIndex); CstString constName = (CstString) pool.get(constNameIndex); requireLength(2); int numValues = input.readUnsignedShort(); CstArray.List list = new CstArray.List(numValues);
int tag = input.readUnsignedByte(); int classInfoIndex = input.readUnsignedShort(); CstString value = (CstString) pool.get(classInfoIndex); Type type = Type.internReturnType(value.getString()); requireLength(4); int typeNameIndex = input.readUnsignedShort(); int constNameIndex = input.readUnsignedShort(); CstString typeName = (CstString) pool.get(typeNameIndex); CstString constName = (CstString) pool.get(constNameIndex); requireLength(2); int numValues = input.readUnsignedShort(); CstArray.List list = new CstArray.List(numValues);
int tag = input.readUnsignedByte(); int classInfoIndex = input.readUnsignedShort(); CstString value = (CstString) pool.get(classInfoIndex); Type type = Type.internReturnType(value.getString()); requireLength(4); int typeNameIndex = input.readUnsignedShort(); int constNameIndex = input.readUnsignedShort(); CstString typeName = (CstString) pool.get(typeNameIndex); CstString constName = (CstString) pool.get(constNameIndex); requireLength(2); int numValues = input.readUnsignedShort(); CstArray.List list = new CstArray.List(numValues);
int tag = input.readUnsignedByte(); int classInfoIndex = input.readUnsignedShort(); CstString value = (CstString) pool.get(classInfoIndex); Type type = Type.internReturnType(value.getString()); requireLength(4); int typeNameIndex = input.readUnsignedShort(); int constNameIndex = input.readUnsignedShort(); CstString typeName = (CstString) pool.get(typeNameIndex); CstString constName = (CstString) pool.get(constNameIndex); requireLength(2); int numValues = input.readUnsignedShort(); CstArray.List list = new CstArray.List(numValues);
int startPc = in.readUnsignedShort(); int length = in.readUnsignedShort(); int nameIdx = in.readUnsignedShort(); int typeIdx = in.readUnsignedShort(); int index = in.readUnsignedShort(); CstString name = (CstString) pool.get(nameIdx); CstString type = (CstString) pool.get(typeIdx);
int startPc = in.readUnsignedShort(); int length = in.readUnsignedShort(); int nameIdx = in.readUnsignedShort(); int typeIdx = in.readUnsignedShort(); int index = in.readUnsignedShort(); CstUtf8 name = (CstUtf8) pool.get(nameIdx); CstUtf8 type = (CstUtf8) pool.get(typeIdx);
int startPc = in.readUnsignedShort(); int length = in.readUnsignedShort(); int nameIdx = in.readUnsignedShort(); int typeIdx = in.readUnsignedShort(); int index = in.readUnsignedShort(); CstString name = (CstString) pool.get(nameIdx); CstString type = (CstString) pool.get(typeIdx);
int startPc = in.readUnsignedShort(); int length = in.readUnsignedShort(); int nameIdx = in.readUnsignedShort(); int typeIdx = in.readUnsignedShort(); int index = in.readUnsignedShort(); CstString name = (CstString) pool.get(nameIdx); CstString type = (CstString) pool.get(typeIdx);
int startPc = in.readUnsignedShort(); int length = in.readUnsignedShort(); int nameIdx = in.readUnsignedShort(); int typeIdx = in.readUnsignedShort(); int index = in.readUnsignedShort(); CstString name = (CstString) pool.get(nameIdx); CstString type = (CstString) pool.get(typeIdx);
int startPc = in.readUnsignedShort(); int length = in.readUnsignedShort(); int nameIdx = in.readUnsignedShort(); int typeIdx = in.readUnsignedShort(); int index = in.readUnsignedShort(); CstString name = (CstString) pool.get(nameIdx); CstString type = (CstString) pool.get(typeIdx);
requireLength(4); int typeIndex = input.readUnsignedShort(); int numElements = input.readUnsignedShort(); CstString typeString = (CstString) pool.get(typeIndex); CstType type = new CstType(Type.intern(typeString.getString()));
requireLength(4); int typeIndex = input.readUnsignedShort(); int numElements = input.readUnsignedShort(); CstString typeString = (CstString) pool.get(typeIndex); CstType type = new CstType(Type.intern(typeString.getString()));
requireLength(4); int typeIndex = input.readUnsignedShort(); int numElements = input.readUnsignedShort(); CstString typeString = (CstString) pool.get(typeIndex); CstType type = new CstType(Type.intern(typeString.getString()));
requireLength(4); int typeIndex = input.readUnsignedShort(); int numElements = input.readUnsignedShort(); CstString typeString = (CstString) pool.get(typeIndex); CstType type = new CstType(Type.intern(typeString.getString()));
requireLength(4); int typeIndex = input.readUnsignedShort(); int numElements = input.readUnsignedShort(); CstString typeString = (CstString) pool.get(typeIndex); CstType type = new CstType(Type.intern(typeString.getString()));
/** * Parses an annotation list. * * @param visibility {@code non-null;} visibility of the parsed annotations * @return {@code non-null;} the list of annotations read from the attribute * data */ private Annotations parseAnnotations(AnnotationVisibility visibility) throws IOException { int count = input.readUnsignedShort(); if (observer != null) { parsed(2, "num_annotations: " + Hex.u2(count)); } Annotations annotations = new Annotations(); for (int i = 0; i < count; i++) { if (observer != null) { parsed(0, "annotations[" + i + "]:"); changeIndent(1); } Annotation annotation = parseAnnotation(visibility); annotations.add(annotation); if (observer != null) { observer.changeIndent(-1); } } annotations.setImmutable(); return annotations; }
/** * Parses a list of annotation lists. * * @param visibility {@code non-null;} visibility of the parsed annotations * @return {@code non-null;} the list of annotation lists read from the attribute * data */ private AnnotationsList parseAnnotationsList( AnnotationVisibility visibility) throws IOException { int count = input.readUnsignedByte(); if (observer != null) { parsed(1, "num_parameters: " + Hex.u1(count)); } AnnotationsList outerList = new AnnotationsList(count); for (int i = 0; i < count; i++) { if (observer != null) { parsed(0, "parameter_annotations[" + i + "]:"); changeIndent(1); } Annotations annotations = parseAnnotations(visibility); outerList.set(i, annotations); if (observer != null) { observer.changeIndent(-1); } } outerList.setImmutable(); return outerList; }