Reads a Runtime[In]VisibleParameterAnnotations attribute and makes the given visitor visit it. @param methodVisitor the visitor that must visit the parameter annotations. @param context information about the class being parsed. @param runtimeParameterAnnotationsOffset the start offset of a Runt
(
final MethodVisitor methodVisitor,
final Context context,
final int runtimeParameterAnnotationsOffset,
final boolean visible)
| 2699 | * attribute, false it is a RuntimeInvisibleParameterAnnotations attribute. |
| 2700 | */ |
| 2701 | private void readParameterAnnotations( |
| 2702 | final MethodVisitor methodVisitor, |
| 2703 | final Context context, |
| 2704 | final int runtimeParameterAnnotationsOffset, |
| 2705 | final boolean visible) { |
| 2706 | int currentOffset = runtimeParameterAnnotationsOffset; |
| 2707 | int numParameters = b[currentOffset++] & 0xFF; |
| 2708 | methodVisitor.visitAnnotableParameterCount(numParameters, visible); |
| 2709 | char[] charBuffer = context.charBuffer; |
| 2710 | for (int i = 0; i < numParameters; ++i) { |
| 2711 | int numAnnotations = readUnsignedShort(currentOffset); |
| 2712 | currentOffset += 2; |
| 2713 | while (numAnnotations-- > 0) { |
| 2714 | // Parse the type_index field. |
| 2715 | String annotationDescriptor = readUTF8(currentOffset, charBuffer); |
| 2716 | currentOffset += 2; |
| 2717 | // Parse num_element_value_pairs and element_value_pairs and visit these values. |
| 2718 | currentOffset = |
| 2719 | readElementValues( |
| 2720 | methodVisitor.visitParameterAnnotation(i, annotationDescriptor, visible), |
| 2721 | currentOffset, |
| 2722 | /* named = */ true, |
| 2723 | charBuffer); |
| 2724 | } |
| 2725 | } |
| 2726 | } |
| 2727 | |
| 2728 | /** |
| 2729 | * Reads the element values of a JVMS 'annotation' structure and makes the given visitor visit |
no test coverage detected