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

Method visitTryCatchAnnotation

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

Source from the content-addressed store, hash-verified

1434 }
1435
1436 @Override
1437 public AnnotationVisitor visitTryCatchAnnotation(
1438 final int typeRef, final TypePath typePath, final String descriptor, final boolean visible) {
1439 // Create a ByteVector to hold a 'type_annotation' JVMS structure.
1440 // See https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-4.html#jvms-4.7.20.
1441 ByteVector typeAnnotation = new ByteVector();
1442 // Write target_type, target_info, and target_path.
1443 TypeReference.putTarget(typeRef, typeAnnotation);
1444 TypePath.put(typePath, typeAnnotation);
1445 // Write type_index and reserve space for num_element_value_pairs.
1446 typeAnnotation.putShort(symbolTable.addConstantUtf8(descriptor)).putShort(0);
1447 if (visible) {
1448 return lastCodeRuntimeVisibleTypeAnnotation =
1449 new AnnotationWriter(symbolTable, typeAnnotation, lastCodeRuntimeVisibleTypeAnnotation);
1450 } else {
1451 return lastCodeRuntimeInvisibleTypeAnnotation =
1452 new AnnotationWriter(symbolTable, typeAnnotation, lastCodeRuntimeInvisibleTypeAnnotation);
1453 }
1454 }
1455
1456 @Override
1457 public void visitLocalVariable(

Callers 1

readTypeAnnotationsMethod · 0.45

Calls 4

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

Tested by

no test coverage detected