/** {@inheritDoc} */ public String getConciseIdentity() { return "annotation_item @0x" + Integer.toHexString(getOffset()); }
/** {@inheritDoc} */ protected void writeItem(AnnotatedOutput out) { Arrays.sort(annotations, new Comparator<AnnotationItem>() { public int compare(AnnotationItem annotationItem, AnnotationItem annotationItem2) { int annotationItemIndex = annotationItem.getEncodedAnnotation().annotationType.getIndex(); int annotationItemIndex2 = annotationItem2.getEncodedAnnotation().annotationType.getIndex(); if (annotationItemIndex < annotationItemIndex2) { return -1; } else if (annotationItemIndex == annotationItemIndex2) { return 0; } return 1; } }); if (out.annotates()) { out.annotate(4, "size: 0x" + Integer.toHexString(annotations.length) + " (" + annotations.length + ")"); for (AnnotationItem annotationItem: annotations) { out.annotate(4, "annotation_off: 0x" + Integer.toHexString(annotationItem.getOffset()) + " - " + annotationItem.getEncodedAnnotation().annotationType.getTypeDescriptor()); } } out.writeInt(annotations.length); for (AnnotationItem annotationItem: annotations) { out.writeInt(annotationItem.getOffset()); } }
/** {@inheritDoc} */ public String getConciseIdentity() { return "annotation_item @0x" + Integer.toHexString(getOffset()); }
/** {@inheritDoc} */ protected void writeItem(AnnotatedOutput out) { Arrays.sort(annotations, new Comparator<AnnotationItem>() { public int compare(AnnotationItem annotationItem, AnnotationItem annotationItem2) { int annotationItemIndex = annotationItem.getEncodedAnnotation().annotationType.getIndex(); int annotationItemIndex2 = annotationItem2.getEncodedAnnotation().annotationType.getIndex(); if (annotationItemIndex < annotationItemIndex2) { return -1; } else if (annotationItemIndex == annotationItemIndex2) { return 0; } return 1; } }); if (out.annotates()) { out.annotate(4, "size: 0x" + Integer.toHexString(annotations.length) + " (" + annotations.length + ")"); for (AnnotationItem annotationItem: annotations) { out.annotate(4, "annotation_off: 0x" + Integer.toHexString(annotationItem.getOffset()) + " - " + annotationItem.getEncodedAnnotation().annotationType.getTypeDescriptor()); } } out.writeInt(annotations.length); for (AnnotationItem annotationItem: annotations) { out.writeInt(annotationItem.getOffset()); } }