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

Method visitAnnotation

src/jvm/clojure/asm/FieldWriter.java:144–158  ·  view source on GitHub ↗
(final String descriptor, final boolean visible)

Source from the content-addressed store, hash-verified

142 // -----------------------------------------------------------------------------------------------
143
144 @Override
145 public AnnotationVisitor visitAnnotation(final String descriptor, final boolean visible) {
146 // Create a ByteVector to hold an 'annotation' JVMS structure.
147 // See https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-4.html#jvms-4.7.16.
148 ByteVector annotation = new ByteVector();
149 // Write type_index and reserve space for num_element_value_pairs.
150 annotation.putShort(symbolTable.addConstantUtf8(descriptor)).putShort(0);
151 if (visible) {
152 return lastRuntimeVisibleAnnotation =
153 new AnnotationWriter(symbolTable, annotation, lastRuntimeVisibleAnnotation);
154 } else {
155 return lastRuntimeInvisibleAnnotation =
156 new AnnotationWriter(symbolTable, annotation, lastRuntimeInvisibleAnnotation);
157 }
158 }
159
160 @Override
161 public AnnotationVisitor visitTypeAnnotation(

Callers 2

acceptMethod · 0.45
readElementValueMethod · 0.45

Calls 2

putShortMethod · 0.95
addConstantUtf8Method · 0.80

Tested by

no test coverage detected