@Override public void initContent(DataInputFullStream data, ConstantPool pool) throws IOException { int len = data.readUnsignedShort(); if (len > 0) { annotations = new ArrayList<>(len); for (int i = 0; i < len; i++) { annotations.add(parse(data, pool)); } } else { annotations = Collections.emptyList(); } }
private static void appendTypeAnnotations(TextBuffer buffer, int indent, StructMember mb, int targetType, int index, Set<String> filter) { for (StructGeneralAttribute.Key<?> key : TYPE_ANNOTATION_ATTRIBUTES) { StructTypeAnnotationAttribute attribute = (StructTypeAnnotationAttribute)mb.getAttribute(key); if (attribute != null) { for (TypeAnnotation annotation : attribute.getAnnotations()) { if (annotation.isTopLevel() && annotation.getTargetType() == targetType && (index < 0 || annotation.getIndex() == index)) { String text = annotation.getAnnotation().toJava(indent, BytecodeMappingTracer.DUMMY).toString(); if (!filter.contains(text)) { buffer.append(text); if (indent < 0) { buffer.append(' '); } else { buffer.appendLineSeparator(); } } } } } } }
attr = new StructTypeAnnotationAttribute();
private static void appendTypeAnnotations(TextBuffer buffer, int indent, StructMember mb, int targetType, int index, Set<String> filter) { for (String name : TYPE_ANNOTATION_ATTRIBUTES) { StructTypeAnnotationAttribute attribute = (StructTypeAnnotationAttribute)mb.getAttribute(name); if (attribute != null) { for (TypeAnnotation annotation : attribute.getAnnotations()) { if (annotation.isTopLevel() && annotation.getTargetType() == targetType && (index < 0 || annotation.getIndex() == index)) { String text = annotation.getAnnotation().toJava(indent, BytecodeMappingTracer.DUMMY).toString(); if (!filter.contains(text)) { buffer.append(text); if (indent < 0) { buffer.append(' '); } else { buffer.appendLineSeparator(); } } } } } } }
attr = new StructTypeAnnotationAttribute();
@Override public void initContent(DataInputFullStream data, ConstantPool pool) throws IOException { int len = data.readUnsignedShort(); if (len > 0) { annotations = new ArrayList<>(len); for (int i = 0; i < len; i++) { annotations.add(parse(data, pool)); } } else { annotations = Collections.emptyList(); } }