/** * Visits the number of method parameters that can have annotations. By default (i.e. when this * method is not called), all the method parameters defined by the method descriptor can have * annotations. * * @param parameterCount the number of method parameters than can have annotations. This number * must be less or equal than the number of parameter types in the method descriptor. It can * be strictly less when a method has synthetic parameters and when these parameters are * ignored when computing parameter indices for the purpose of parameter annotations (see * https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-4.html#jvms-4.7.18). * @param visible {@literal true} to define the number of method parameters that can have * annotations visible at runtime, {@literal false} to define the number of method parameters * that can have annotations invisible at runtime. */ public void visitAnnotableParameterCount(final int parameterCount, final boolean visible) { if (mv != null) { mv.visitAnnotableParameterCount(parameterCount, visible); } }
int currentOffset = runtimeParameterAnnotationsOffset; int numParameters = b[currentOffset++] & 0xFF; methodVisitor.visitAnnotableParameterCount(numParameters, visible); char[] charBuffer = context.charBuffer; for (int i = 0; i < numParameters; ++i) {
/** * Visits the number of method parameters that can have annotations. By default (i.e. when this * method is not called), all the method parameters defined by the method descriptor can have * annotations. * * @param parameterCount the number of method parameters than can have annotations. This number * must be less or equal than the number of parameter types in the method descriptor. It can * be strictly less when a method has synthetic parameters and when these parameters are * ignored when computing parameter indices for the purpose of parameter annotations (see * https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-4.html#jvms-4.7.18). * @param visible <tt>true</tt> to define the number of method parameters that can have * annotations visible at runtime, <tt>false</tt> to define the number of method parameters * that can have annotations invisible at runtime. */ public void visitAnnotableParameterCount(final int parameterCount, final boolean visible) { if (mv != null) { mv.visitAnnotableParameterCount(parameterCount, visible); } }
/** * Visits the number of method parameters that can have annotations. By default (i.e. when this * method is not called), all the method parameters defined by the method descriptor can have * annotations. * * @param parameterCount the number of method parameters than can have annotations. This number * must be less or equal than the number of parameter types in the method descriptor. It can * be strictly less when a method has synthetic parameters and when these parameters are * ignored when computing parameter indices for the purpose of parameter annotations (see * https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-4.html#jvms-4.7.18). * @param visible {@literal true} to define the number of method parameters that can have * annotations visible at runtime, {@literal false} to define the number of method parameters * that can have annotations invisible at runtime. */ public void visitAnnotableParameterCount(final int parameterCount, final boolean visible) { if (mv != null) { mv.visitAnnotableParameterCount(parameterCount, visible); } }
/** * Visits the number of method parameters that can have annotations. By default (i.e. when this * method is not called), all the method parameters defined by the method descriptor can have * annotations. * * @param parameterCount the number of method parameters than can have annotations. This number * must be less or equal than the number of parameter types in the method descriptor. It can * be strictly less when a method has synthetic parameters and when these parameters are * ignored when computing parameter indices for the purpose of parameter annotations (see * https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-4.html#jvms-4.7.18). * @param visible {@literal true} to define the number of method parameters that can have * annotations visible at runtime, {@literal false} to define the number of method parameters * that can have annotations invisible at runtime. */ public void visitAnnotableParameterCount(final int parameterCount, final boolean visible) { if (mv != null) { mv.visitAnnotableParameterCount(parameterCount, visible); } }
@Override public void visitAnnotableParameterCount(final int parameterCount, final boolean visible) { checkVisitEndNotCalled(); if (visible) { visibleAnnotableParameterCount = parameterCount; } else { invisibleAnnotableParameterCount = parameterCount; } super.visitAnnotableParameterCount(parameterCount, visible); }
@Override public void visitAnnotableParameterCount(final int parameterCount, final boolean visible) { p.visitAnnotableParameterCount(parameterCount, visible); super.visitAnnotableParameterCount(parameterCount, visible); }
@Override public void begin(final String name, final Attributes attrs) { int parameterCount = Integer.parseInt(attrs.getValue("count")); boolean visible = Boolean.valueOf(attrs.getValue("visible")).booleanValue(); ((MethodVisitor) peek()).visitAnnotableParameterCount(parameterCount, visible); } }
@Override public void visitAnnotableParameterCount(final int parameterCount, final boolean visible) { checkVisitEndNotCalled(); if (visible) { visibleAnnotableParameterCount = parameterCount; } else { invisibleAnnotableParameterCount = parameterCount; } super.visitAnnotableParameterCount(parameterCount, visible); }
@Override public void visitAnnotableParameterCount(final int parameterCount, final boolean visible) { p.visitAnnotableParameterCount(parameterCount, visible); super.visitAnnotableParameterCount(parameterCount, visible); }
methodVisitor.visitAnnotableParameterCount(visibleAnnotableParameterCount, true); methodVisitor.visitAnnotableParameterCount(invisibleAnnotableParameterCount, false);
int currentOffset = runtimeParameterAnnotationsOffset; int numParameters = b[currentOffset++] & 0xFF; methodVisitor.visitAnnotableParameterCount(numParameters, visible); char[] charBuffer = context.charBuffer; for (int i = 0; i < numParameters; ++i) {
int currentOffset = runtimeParameterAnnotationsOffset; int numParameters = b[currentOffset++] & 0xFF; methodVisitor.visitAnnotableParameterCount(numParameters, visible); char[] charBuffer = context.charBuffer; for (int i = 0; i < numParameters; ++i) {
int currentOffset = runtimeParameterAnnotationsOffset; int numParameters = b[currentOffset++] & 0xFF; methodVisitor.visitAnnotableParameterCount(numParameters, visible); char[] charBuffer = context.charBuffer; for (int i = 0; i < numParameters; ++i) {