MCPcopy Index your code
hub / github.com/clojure/clojure / visitInsnAnnotation

Method visitInsnAnnotation

src/jvm/clojure/asm/MethodWriter.java:1402–1420  ·  view source on GitHub ↗
(
      final int typeRef, final TypePath typePath, final String descriptor, final boolean visible)

Source from the content-addressed store, hash-verified

1400 }
1401
1402 @Override
1403 public AnnotationVisitor visitInsnAnnotation(
1404 final int typeRef, final TypePath typePath, final String descriptor, final boolean visible) {
1405 // Create a ByteVector to hold a 'type_annotation' JVMS structure.
1406 // See https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-4.html#jvms-4.7.20.
1407 ByteVector typeAnnotation = new ByteVector();
1408 // Write target_type, target_info, and target_path.
1409 TypeReference.putTarget((typeRef & 0xFF0000FF) | (lastBytecodeOffset << 8), typeAnnotation);
1410 TypePath.put(typePath, typeAnnotation);
1411 // Write type_index and reserve space for num_element_value_pairs.
1412 typeAnnotation.putShort(symbolTable.addConstantUtf8(descriptor)).putShort(0);
1413 if (visible) {
1414 return lastCodeRuntimeVisibleTypeAnnotation =
1415 new AnnotationWriter(symbolTable, typeAnnotation, lastCodeRuntimeVisibleTypeAnnotation);
1416 } else {
1417 return lastCodeRuntimeInvisibleTypeAnnotation =
1418 new AnnotationWriter(symbolTable, typeAnnotation, lastCodeRuntimeInvisibleTypeAnnotation);
1419 }
1420 }
1421
1422 @Override
1423 public void visitTryCatchBlock(

Callers 1

readCodeMethod · 0.45

Calls 4

putTargetMethod · 0.95
putMethod · 0.95
putShortMethod · 0.95
addConstantUtf8Method · 0.80

Tested by

no test coverage detected