(final String descriptor, final boolean visible)
| 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( |
no test coverage detected