Package br.com.caelum.vraptor.asm

Examples of br.com.caelum.vraptor.asm.FieldVisitor


    if (logger.isDebugEnabled()) {
      logger.debug("Method for field '" + fieldName + "' being defined for type " + definition);
    }

    {
      FieldVisitor fv = cw.visitField(ACC_PRIVATE, fieldName + "_", definition, genericDefinition, null);
      fv.visitEnd();
    }
    {
      MethodVisitor mv = cw.visitMethod(ACC_PUBLIC, "set" + fieldName, "(" + definition + ")V",
          genericDefinition == null ? null : "(" + genericDefinition + ")V", null);
      mv.visitCode();
View Full Code Here


    }

    @Override
    public FieldVisitor visitField(final int access, final String name, final String desc, final String signature,
            final Object value) {
        FieldVisitor fv = super.visitField(access, remapper.mapFieldName(className, name, desc),
                remapper.mapDesc(desc), remapper.mapSignature(signature, true), remapper.mapValue(value));
        return fv == null ? null : createRemappingFieldAdapter(fv);
    }
View Full Code Here

    if (logger.isDebugEnabled()) {
      logger.debug("Method for field '" + fieldName + "' being defined for type " + definition);
    }

    {
      FieldVisitor fv = cw.visitField(ACC_PRIVATE, fieldName + "_", definition, genericDefinition, null);
      fv.visitEnd();
    }
    {
      MethodVisitor mv = cw.visitMethod(ACC_PUBLIC, "set" + fieldName, "(" + definition + ")V",
          genericDefinition == null ? null : "(" + genericDefinition + ")V", null);
      mv.visitCode();
View Full Code Here

            CheckMethodAdapter.checkFieldSignature(signature);
        }
        if (value != null) {
            CheckMethodAdapter.checkConstant(value);
        }
        FieldVisitor av = cv.visitField(access, name, desc, signature, value);
        return new CheckFieldAdapter(av);
    }
View Full Code Here

     *
     * @param cv
     *            a class visitor.
     */
    public void accept(final ClassVisitor cv) {
        FieldVisitor fv = cv.visitField(access, name, desc, signature, value);
        if (fv == null) {
            return;
        }
        int i, n;
        n = visibleAnnotations == null ? 0 : visibleAnnotations.size();
        for (i = 0; i < n; ++i) {
            AnnotationNode an = (AnnotationNode) visibleAnnotations.get(i);
            an.accept(fv.visitAnnotation(an.desc, true));
        }
        n = invisibleAnnotations == null ? 0 : invisibleAnnotations.size();
        for (i = 0; i < n; ++i) {
            AnnotationNode an = (AnnotationNode) invisibleAnnotations.get(i);
            an.accept(fv.visitAnnotation(an.desc, false));
        }
        n = attrs == null ? 0 : attrs.size();
        for (i = 0; i < n; ++i) {
            fv.visitAttribute((Attribute) attrs.get(i));
        }
        fv.visitEnd();
    }
View Full Code Here

    if (logger.isDebugEnabled()) {
      logger.debug("Method for field '" + fieldName + "' being defined for type " + definition);
    }

    {
      FieldVisitor fv = cw.visitField(ACC_PRIVATE, fieldName + "_", definition, genericDefinition, null);
      fv.visitEnd();
    }
    {
      MethodVisitor mv = cw.visitMethod(ACC_PUBLIC, "set" + fieldName, "(" + definition + ")V",
          genericDefinition == null ? null : "(" + genericDefinition + ")V", null);
      mv.visitCode();
View Full Code Here

            CheckMethodAdapter.checkFieldSignature(signature);
        }
        if (value != null) {
            CheckMethodAdapter.checkConstant(value);
        }
        FieldVisitor av = cv.visitField(access, name, desc, signature, value);
        return new CheckFieldAdapter(av);
    }
View Full Code Here

TOP

Related Classes of br.com.caelum.vraptor.asm.FieldVisitor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.