(
final int typeRef, final TypePath typePath, final String descriptor, final boolean visible)
| 328 | } |
| 329 | |
| 330 | @Override |
| 331 | public final AnnotationVisitor visitTypeAnnotation( |
| 332 | final int typeRef, final TypePath typePath, final String descriptor, final boolean visible) { |
| 333 | // Create a ByteVector to hold a 'type_annotation' JVMS structure. |
| 334 | // See https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-4.html#jvms-4.7.20. |
| 335 | ByteVector typeAnnotation = new ByteVector(); |
| 336 | // Write target_type, target_info, and target_path. |
| 337 | TypeReference.putTarget(typeRef, typeAnnotation); |
| 338 | TypePath.put(typePath, typeAnnotation); |
| 339 | // Write type_index and reserve space for num_element_value_pairs. |
| 340 | typeAnnotation.putShort(symbolTable.addConstantUtf8(descriptor)).putShort(0); |
| 341 | if (visible) { |
| 342 | return lastRuntimeVisibleTypeAnnotation = |
| 343 | new AnnotationWriter(symbolTable, typeAnnotation, lastRuntimeVisibleTypeAnnotation); |
| 344 | } else { |
| 345 | return lastRuntimeInvisibleTypeAnnotation = |
| 346 | new AnnotationWriter(symbolTable, typeAnnotation, lastRuntimeInvisibleTypeAnnotation); |
| 347 | } |
| 348 | } |
| 349 | |
| 350 | @Override |
| 351 | public final void visitAttribute(final Attribute attribute) { |
nothing calls this directly
no test coverage detected