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 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 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 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; }
requireLength(4); int typeIndex = input.readUnsignedShort(); int numElements = input.readUnsignedShort(); CstUtf8 typeUtf8 = (CstUtf8) pool.get(typeIndex); CstType type = new CstType(Type.intern(typeUtf8.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 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 {@link NameValuePair}. * * @return {@code non-null;} the parsed element */ private NameValuePair parseElement() throws IOException { requireLength(5); int elementNameIndex = input.readUnsignedShort(); CstUtf8 elementName = (CstUtf8) pool.get(elementNameIndex); if (observer != null) { parsed(2, "element_name: " + elementName.toHuman()); parsed(0, "value: "); changeIndent(1); } Constant value = parseValue(); if (observer != null) { changeIndent(-1); } return new NameValuePair(elementName, value); }
/** * Parses a {@link NameValuePair}. * * @return {@code non-null;} the parsed element */ private NameValuePair parseElement() throws IOException { requireLength(5); int elementNameIndex = input.readUnsignedShort(); CstString elementName = (CstString) pool.get(elementNameIndex); if (observer != null) { parsed(2, "element_name: " + elementName.toHuman()); parsed(0, "value: "); changeIndent(1); } Constant value = parseValue(); if (observer != null) { changeIndent(-1); } return new NameValuePair(elementName, value); }
/** * Parses a {@link NameValuePair}. * * @return {@code non-null;} the parsed element */ private NameValuePair parseElement() throws IOException { requireLength(5); int elementNameIndex = input.readUnsignedShort(); CstString elementName = (CstString) pool.get(elementNameIndex); if (observer != null) { parsed(2, "element_name: " + elementName.toHuman()); parsed(0, "value: "); changeIndent(1); } Constant value = parseValue(); if (observer != null) { changeIndent(-1); } return new NameValuePair(elementName, value); }
/** * Parses a {@link NameValuePair}. * * @return {@code non-null;} the parsed element */ private NameValuePair parseElement() throws IOException { requireLength(5); int elementNameIndex = input.readUnsignedShort(); CstString elementName = (CstString) pool.get(elementNameIndex); if (observer != null) { parsed(2, "element_name: " + elementName.toHuman()); parsed(0, "value: "); changeIndent(1); } Constant value = parseValue(); if (observer != null) { changeIndent(-1); } return new NameValuePair(elementName, value); }
/** * Parses a {@link NameValuePair}. * * @return {@code non-null;} the parsed element */ private NameValuePair parseElement() throws IOException { requireLength(5); int elementNameIndex = input.readUnsignedShort(); CstString elementName = (CstString) pool.get(elementNameIndex); if (observer != null) { parsed(2, "element_name: " + elementName.toHuman()); parsed(0, "value: "); changeIndent(1); } Constant value = parseValue(); if (observer != null) { changeIndent(-1); } return new NameValuePair(elementName, value); }
/** * Parses a {@link NameValuePair}. * * @return {@code non-null;} the parsed element */ private NameValuePair parseElement() throws IOException { requireLength(5); int elementNameIndex = input.readUnsignedShort(); CstString elementName = (CstString) pool.get(elementNameIndex); if (observer != null) { parsed(2, "element_name: " + elementName.toHuman()); parsed(0, "value: "); changeIndent(1); } Constant value = parseValue(); if (observer != null) { changeIndent(-1); } return new NameValuePair(elementName, value); }
/** * Helper for {@link #parseValue}, which parses a constant reference * and returns the referred-to constant value. * * @return {@code non-null;} the parsed value */ private Constant parseConstant() throws IOException { int constValueIndex = input.readUnsignedShort(); Constant value = (Constant) pool.get(constValueIndex); if (observer != null) { String human = (value instanceof CstUtf8) ? ((CstUtf8) value).toQuoted() : value.toHuman(); parsed(2, "constant_value: " + human); } return value; }
/** * Helper for {@link #parseValue}, which parses a constant reference * and returns the referred-to constant value. * * @return {@code non-null;} the parsed value */ private Constant parseConstant() throws IOException { int constValueIndex = input.readUnsignedShort(); Constant value = (Constant) pool.get(constValueIndex); if (observer != null) { String human = (value instanceof CstString) ? ((CstString) value).toQuoted() : value.toHuman(); parsed(2, "constant_value: " + human); } return value; }
/** * Helper for {@link #parseValue}, which parses a constant reference * and returns the referred-to constant value. * * @return {@code non-null;} the parsed value */ private Constant parseConstant() throws IOException { int constValueIndex = input.readUnsignedShort(); Constant value = (Constant) pool.get(constValueIndex); if (observer != null) { String human = (value instanceof CstString) ? ((CstString) value).toQuoted() : value.toHuman(); parsed(2, "constant_value: " + human); } return value; }
/** * Helper for {@link #parseValue}, which parses a constant reference * and returns the referred-to constant value. * * @return {@code non-null;} the parsed value */ private Constant parseConstant() throws IOException { int constValueIndex = input.readUnsignedShort(); Constant value = (Constant) pool.get(constValueIndex); if (observer != null) { String human = (value instanceof CstString) ? ((CstString) value).toQuoted() : value.toHuman(); parsed(2, "constant_value: " + human); } return value; }
/** * Helper for {@link #parseValue}, which parses a constant reference * and returns the referred-to constant value. * * @return {@code non-null;} the parsed value */ private Constant parseConstant() throws IOException { int constValueIndex = input.readUnsignedShort(); Constant value = (Constant) pool.get(constValueIndex); if (observer != null) { String human = (value instanceof CstString) ? ((CstString) value).toQuoted() : value.toHuman(); parsed(2, "constant_value: " + human); } return value; }
/** * Helper for {@link #parseValue}, which parses a constant reference * and returns the referred-to constant value. * * @return {@code non-null;} the parsed value */ private Constant parseConstant() throws IOException { int constValueIndex = input.readUnsignedShort(); Constant value = (Constant) pool.get(constValueIndex); if (observer != null) { String human = (value instanceof CstString) ? ((CstString) value).toQuoted() : value.toHuman(); parsed(2, "constant_value: " + human); } return value; }