/** * Visits a field of the class. * * @param access the field's access flags (see {@link Opcodes}). This parameter also indicates if * the field is synthetic and/or deprecated. * @param name the field's name. * @param descriptor the field's descriptor (see {@link Type}). * @param signature the field's signature. May be {@literal null} if the field's type does not use * generic types. * @param value the field's initial value. This parameter, which may be {@literal null} if the * field does not have an initial value, must be an {@link Integer}, a {@link Float}, a {@link * Long}, a {@link Double} or a {@link String} (for {@code int}, {@code float}, {@code long} * or {@code String} fields respectively). <i>This parameter is only used for static * fields</i>. Its value is ignored for non static fields, which must be initialized through * bytecode instructions in constructors or methods. * @return a visitor to visit field annotations and attributes, or {@literal null} if this class * visitor is not interested in visiting these annotations and attributes. */ public FieldVisitor visitField( final int access, final String name, final String descriptor, final String signature, final Object value) { if (cv != null) { return cv.visitField(access, name, descriptor, signature, value); } return null; }
/** * Clones advices fields to destination. */ @Override public FieldVisitor visitField(final int access, final String name, final String desc, final String signature, final Object value) { wd.dest.visitField(access, adviceFieldName(name, aspectIndex), desc, signature, value); // [A5] return super.visitField(access, name, desc, signature, value); }
final FieldVisitor fv = wd.dest.visitField(AsmUtil.ACC_PRIVATE | AsmUtil.ACC_FINAL, wd.wrapperRef, wd.wrapperType, null, null); fv.visitEnd(); final FieldVisitor fv = wd.dest.visitField(AsmUtil.ACC_PUBLIC, wd.wrapperRef, wd.wrapperType, null, null); fv.visitEnd();
classVisitor.visitField(accessFlags, name, descriptor, signature, constantValue); if (fieldVisitor == null) { return currentOffset;
/** * Visits a field of the class. * * @param access the field's access flags (see {@link Opcodes}). This parameter also indicates if * the field is synthetic and/or deprecated. * @param name the field's name. * @param descriptor the field's descriptor (see {@link Type}). * @param signature the field's signature. May be {@literal null} if the field's type does not use * generic types. * @param value the field's initial value. This parameter, which may be {@literal null} if the * field does not have an initial value, must be an {@link Integer}, a {@link Float}, a {@link * Long}, a {@link Double} or a {@link String} (for {@code int}, {@code float}, {@code long} * or {@code String} fields respectively). <i>This parameter is only used for static * fields</i>. Its value is ignored for non static fields, which must be initialized through * bytecode instructions in constructors or methods. * @return a visitor to visit field annotations and attributes, or {@literal null} if this class * visitor is not interested in visiting these annotations and attributes. */ public FieldVisitor visitField( final int access, final String name, final String descriptor, final String signature, final Object value) { if (cv != null) { return cv.visitField(access, name, descriptor, signature, value); } return null; }
/** * Clones advices fields to destination. */ @Override public FieldVisitor visitField(final int access, final String name, final String desc, final String signature, final Object value) { wd.dest.visitField(access, adviceFieldName(name, aspectIndex), desc, signature, value); // [A5] return super.visitField(access, name, desc, signature, value); }
final FieldVisitor fv = wd.dest.visitField(AsmUtil.ACC_PRIVATE | AsmUtil.ACC_FINAL, wd.wrapperRef, wd.wrapperType, null, null); fv.visitEnd(); final FieldVisitor fv = wd.dest.visitField(AsmUtil.ACC_PUBLIC, wd.wrapperRef, wd.wrapperType, null, null); fv.visitEnd();
classVisitor.visitField(accessFlags, name, descriptor, signature, constantValue); if (fieldVisitor == null) { return currentOffset;