(
final int typeRef, final TypePath typePath, final String descriptor, final boolean visible)
| 664 | } |
| 665 | |
| 666 | @Override |
| 667 | public AnnotationVisitor visitTypeAnnotation( |
| 668 | final int typeRef, final TypePath typePath, final String descriptor, final boolean visible) { |
| 669 | // Create a ByteVector to hold a 'type_annotation' JVMS structure. |
| 670 | // See https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-4.html#jvms-4.7.20. |
| 671 | ByteVector typeAnnotation = new ByteVector(); |
| 672 | // Write target_type, target_info, and target_path. |
| 673 | TypeReference.putTarget(typeRef, typeAnnotation); |
| 674 | TypePath.put(typePath, typeAnnotation); |
| 675 | // Write type_index and reserve space for num_element_value_pairs. |
| 676 | typeAnnotation.putShort(symbolTable.addConstantUtf8(descriptor)).putShort(0); |
| 677 | if (visible) { |
| 678 | return lastRuntimeVisibleTypeAnnotation = |
| 679 | new AnnotationWriter(symbolTable, typeAnnotation, lastRuntimeVisibleTypeAnnotation); |
| 680 | } else { |
| 681 | return lastRuntimeInvisibleTypeAnnotation = |
| 682 | new AnnotationWriter(symbolTable, typeAnnotation, lastRuntimeInvisibleTypeAnnotation); |
| 683 | } |
| 684 | } |
| 685 | |
| 686 | @Override |
| 687 | public void visitAnnotableParameterCount(final int parameterCount, final boolean visible) { |
nothing calls this directly
no test coverage detected