Package org.objectweb.asm.tree

Examples of org.objectweb.asm.tree.FieldInsnNode


    public void visitFieldInsn(final int opcode, final String owner, final String name,
        final String desc) {
      // If GETFIELD and not owned by property map or not synthetic
      if (opcode == Opcodes.GETFIELD
          && (!owner.equals(propMapClassInternalName) || !syntheticFields.contains(name)))
        instructions.add(new FieldInsnNode(opcode, owner, name, desc));
    }
View Full Code Here


    public void visitEnd() {
      for (int i = 0; i < instructions.size(); i++) {
        AbstractInsnNode ins = instructions.get(i);

        if (ins.getOpcode() == Opcodes.GETFIELD) {
          FieldInsnNode fn = (FieldInsnNode) ins;

          if (fn.owner.equals(propMapClassInternalName) && fn.desc.equals(PROXY_FIELD_DESC)) {
            if (fn.name.equals(SOURCE_FIELD))
              subjectType = 1;
            else if (fn.name.equals(DEST_FIELD))
View Full Code Here

    // TODO implement?
    return false;
  }

  private static boolean sameFieldInsn(AbstractInsnNode o, AbstractInsnNode n) {
    FieldInsnNode oi = (FieldInsnNode) o;
    if (!(n instanceof FieldInsnNode)) {
      return false;
    }
    FieldInsnNode ni = (FieldInsnNode) n;
    return oi.name.equals(ni.name) && oi.desc.equals(ni.desc) && oi.owner.equals(ni.owner);
  }
View Full Code Here

                return;
            }

            VarInsnNode vi = null;
            TypeInsnNode ti = null;
            FieldInsnNode fi = null;
            String tidesc = null;
            MethodInsnNode mi = null;
            Type midesc = null;

            switch (anode.getType()) {
View Full Code Here

        case IF_ACMPNE:
            expected1 = BasicValue.REFERENCE_VALUE;
            expected2 = BasicValue.REFERENCE_VALUE;
            break;
        case PUTFIELD:
            FieldInsnNode fin = (FieldInsnNode) insn;
            expected1 = newValue(Type.getObjectType(fin.owner));
            expected2 = newValue(Type.getType(fin.desc));
            break;
        default:
            throw new Error("Internal error.");
View Full Code Here

      case 3:
        TypeInsnNode tinsn = (TypeInsnNode) insn;
        visitTypeInsn(tinsn.getOpcode(), tinsn.desc);
        break;
      case 4:
        FieldInsnNode finsn = (FieldInsnNode) insn;
        visitFieldInsn(finsn.getOpcode(), finsn.owner, finsn.name, finsn.desc);
        break;
      case 5:
        MethodInsnNode minsn = (MethodInsnNode) insn;
        visitMethodInsn(minsn.getOpcode(), minsn.owner, minsn.name, minsn.desc);
        break;
View Full Code Here

    if (isClass())
      return new TypeInsnNode(opcode, s_owner);
    else if (isMethod())
      return new MethodInsnNode(opcode, s_owner, s_name, s_desc);
    else
      return new FieldInsnNode(opcode, s_owner, s_name, s_desc);
  }
View Full Code Here

    super(api);
  }

  private TypedValue createGetFieldTypedValue(AbstractInsnNode insn, Value base)
   {
      FieldInsnNode fieldInsn = (FieldInsnNode)insn;
      return new TypedValue.GetFieldValue(fieldInsn.owner, fieldInsn.name, fieldInsn.desc, (TypedValue)base);
   }
View Full Code Here

    }

    public MethodDefinition getField(ParameterizedType target, String fieldName, ParameterizedType fieldType)
    {
        instructionList.add(
                new FieldInsnNode(
                        GETFIELD,
                        target.getClassName(),
                        fieldName,
                        fieldType.getType()
                )
View Full Code Here

    }

    public MethodDefinition getStaticField(ParameterizedType target, String fieldName, ParameterizedType fieldType)
    {
        instructionList.add(
                new FieldInsnNode(
                        GETSTATIC,
                        target.getClassName(),
                        fieldName,
                        fieldType.getType()
                )
View Full Code Here

TOP

Related Classes of org.objectweb.asm.tree.FieldInsnNode

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.