@Override public void visitParameter(final String name, final int access) { if (name != null) { checkUnqualifiedName(version, name, "name"); } CheckClassAdapter.checkAccess( access, Opcodes.ACC_FINAL + Opcodes.ACC_MANDATED + Opcodes.ACC_SYNTHETIC); super.visitParameter(name, access); }
@Override public void visitParameter(final String name, final int access) { if (name != null) { checkUnqualifiedName(version, name, "name"); } CheckClassAdapter.checkAccess( access, Opcodes.ACC_FINAL + Opcodes.ACC_MANDATED + Opcodes.ACC_SYNTHETIC); super.visitParameter(name, access); }
@Override public void visitParameter(String name, int access) { if (name != null) { checkUnqualifiedName(version, name, "name"); } CheckClassAdapter.checkAccess(access, Opcodes.ACC_FINAL + Opcodes.ACC_MANDATED + Opcodes.ACC_SYNTHETIC); super.visitParameter(name, access); }
@Override public void visitFieldInsn( final int opcode, final String owner, final String name, final String descriptor) { checkVisitCodeCalled(); checkVisitMaxsNotCalled(); checkOpcodeMethod(opcode, Method.VISIT_FIELD_INSN); checkInternalName(version, owner, "owner"); checkUnqualifiedName(version, name, "name"); checkDescriptor(version, descriptor, false); super.visitFieldInsn(opcode, owner, name, descriptor); ++insnCount; }
@Override public void visitLocalVariable(final String name, final String desc, final String signature, final Label start, final Label end, final int index) { checkStartCode(); checkEndCode(); checkUnqualifiedName(version, name, "name"); checkDesc(desc, false); checkLabel(start, true, "start label"); checkLabel(end, true, "end label"); checkUnsignedShort(index, "Invalid variable index"); int s = labels.get(start).intValue(); int e = labels.get(end).intValue(); if (e < s) { throw new IllegalArgumentException( "Invalid start and end labels (end must be greater than start)"); } super.visitLocalVariable(name, desc, signature, start, end, index); }
@Override public void visitFieldInsn( final int opcode, final String owner, final String name, final String descriptor) { checkVisitCodeCalled(); checkVisitMaxsNotCalled(); checkOpcodeMethod(opcode, Method.VISIT_FIELD_INSN); checkInternalName(version, owner, "owner"); checkUnqualifiedName(version, name, "name"); checkDescriptor(version, descriptor, false); super.visitFieldInsn(opcode, owner, name, descriptor); ++insnCount; }
@Override public void visitFieldInsn(final int opcode, final String owner, final String name, final String desc) { checkStartCode(); checkEndCode(); checkOpcode(opcode, 4); checkInternalName(owner, "owner"); checkUnqualifiedName(version, name, "name"); checkDesc(desc, false); super.visitFieldInsn(opcode, owner, name, desc); ++insnCount; }
@Override public void visitLocalVariable( final String name, final String descriptor, final String signature, final Label start, final Label end, final int index) { checkVisitCodeCalled(); checkVisitMaxsNotCalled(); checkUnqualifiedName(version, name, "name"); checkDescriptor(version, descriptor, false); checkLabel(start, true, START_LABEL); checkLabel(end, true, END_LABEL); checkUnsignedShort(index, INVALID_LOCAL_VARIABLE_INDEX); int startInsnIndex = labelInsnIndices.get(start).intValue(); int endInsnIndex = labelInsnIndices.get(end).intValue(); if (endInsnIndex < startInsnIndex) { throw new IllegalArgumentException( "Invalid start and end labels (end must be greater than start)"); } super.visitLocalVariable(name, descriptor, signature, start, end, index); }
@Override public void visitLocalVariable( final String name, final String descriptor, final String signature, final Label start, final Label end, final int index) { checkVisitCodeCalled(); checkVisitMaxsNotCalled(); checkUnqualifiedName(version, name, "name"); checkDescriptor(version, descriptor, false); checkLabel(start, true, START_LABEL); checkLabel(end, true, END_LABEL); checkUnsignedShort(index, INVALID_LOCAL_VARIABLE_INDEX); int startInsnIndex = labelInsnIndices.get(start).intValue(); int endInsnIndex = labelInsnIndices.get(end).intValue(); if (endInsnIndex < startInsnIndex) { throw new IllegalArgumentException( "Invalid start and end labels (end must be greater than start)"); } super.visitLocalVariable(name, descriptor, signature, start, end, index); }
@Override public FieldVisitor visitField(final int access, final String name, final String desc, final String signature, final Object value) { checkState(); checkAccess(access, Opcodes.ACC_PUBLIC + Opcodes.ACC_PRIVATE + Opcodes.ACC_PROTECTED + Opcodes.ACC_STATIC + Opcodes.ACC_FINAL + Opcodes.ACC_VOLATILE + Opcodes.ACC_TRANSIENT + Opcodes.ACC_SYNTHETIC + Opcodes.ACC_ENUM + Opcodes.ACC_DEPRECATED + 0x40000); // ClassWriter.ACC_SYNTHETIC_ATTRIBUTE CheckMethodAdapter.checkUnqualifiedName(version, name, "field name"); CheckMethodAdapter.checkDesc(desc, false); if (signature != null) { checkFieldSignature(signature); } if (value != null) { CheckMethodAdapter.checkConstant(value); } FieldVisitor av = super .visitField(access, name, desc, signature, value); return new CheckFieldAdapter(av); }
@Override public FieldVisitor visitField( final int access, final String name, final String descriptor, final String signature, final Object value) { checkState(); checkAccess( access, Opcodes.ACC_PUBLIC | Opcodes.ACC_PRIVATE | Opcodes.ACC_PROTECTED | Opcodes.ACC_STATIC | Opcodes.ACC_FINAL | Opcodes.ACC_VOLATILE | Opcodes.ACC_TRANSIENT | Opcodes.ACC_SYNTHETIC | Opcodes.ACC_ENUM | Opcodes.ACC_DEPRECATED); CheckMethodAdapter.checkUnqualifiedName(version, name, "field name"); CheckMethodAdapter.checkDescriptor(version, descriptor, /* canBeVoid = */ false); if (signature != null) { checkFieldSignature(signature); } if (value != null) { CheckMethodAdapter.checkConstant(value); } return new CheckFieldAdapter(api, super.visitField(access, name, descriptor, signature, value)); }
@Override public FieldVisitor visitField( final int access, final String name, final String descriptor, final String signature, final Object value) { checkState(); checkAccess( access, Opcodes.ACC_PUBLIC | Opcodes.ACC_PRIVATE | Opcodes.ACC_PROTECTED | Opcodes.ACC_STATIC | Opcodes.ACC_FINAL | Opcodes.ACC_VOLATILE | Opcodes.ACC_TRANSIENT | Opcodes.ACC_SYNTHETIC | Opcodes.ACC_ENUM | Opcodes.ACC_DEPRECATED); CheckMethodAdapter.checkUnqualifiedName(version, name, "field name"); CheckMethodAdapter.checkDescriptor(version, descriptor, /* canBeVoid = */ false); if (signature != null) { checkFieldSignature(signature); } if (value != null) { CheckMethodAdapter.checkConstant(value); } return new CheckFieldAdapter(api, super.visitField(access, name, descriptor, signature, value)); }