Examples of FieldRef


Examples of com.litecoding.smali2java.entity.smali.FieldRef

      String dstType = "(UNKNOWN)";
      OpcodeData opcodeData = instruction.getOpcodeData();
      if(opcodeData.getType() == OpcodeData.TYPE_GET) {
        //TODO: handle aget*
        List<SmaliCodeEntity> args = instruction.getArguments();
        FieldRef srcField = (FieldRef) args.get(args.size() - 1);
        dstType = srcField.getType();
      } else if(opcodeData.getType() == OpcodeData.TYPE_CONST) {
        if(opcodeData.getOpcode() == Opcodes.OP_CONST_STRING)
          dstType = "Ljava/lang/String;";
        else
          dstType = "(BY CONST)";
View Full Code Here

Examples of com.pclewis.mcpatcher.FieldRef

    @Override
    public byte[] getReplacementBytes() throws IOException {
        return buildCode(
            getCaptureGroup(1),
            reference(GETSTATIC, new FieldRef(MCPatcherUtils.TILE_SIZE_CLASS, field, type)),
            getCaptureGroup(2)
        );
    }
View Full Code Here

Examples of com.pclewis.mcpatcher.FieldRef

            );
        }

        @Override
        public byte[] getReplacementBytes() throws IOException {
            byte[] getField = reference(GETSTATIC, new FieldRef(MCPatcherUtils.TILE_SIZE_CLASS, "int_size", "I"));
            return buildCode(
                getField,
                getField,
                getCaptureGroup(1),
                getField
View Full Code Here

Examples of com.pclewis.mcpatcher.FieldRef

        @Override
        public byte[] getReplacementBytes() throws IOException {
            byte[] offset = getCaptureGroup(2);
            if (offset[0] != FCONST_0) {
                offset = reference(GETSTATIC, new FieldRef(MCPatcherUtils.TILE_SIZE_CLASS, "float_sizeMinus0_01", "F"));
            }
            return buildCode(
                push(16),
                getCaptureGroup(1),
                reference(GETSTATIC, new FieldRef(MCPatcherUtils.TILE_SIZE_CLASS, "int_size", "I")),
                IMUL,
                I2F,
                offset,
                FADD,
                reference(GETSTATIC, new FieldRef(MCPatcherUtils.TILE_SIZE_CLASS, "float_size16", "F"))
            );
        }
View Full Code Here

Examples of com.pclewis.mcpatcher.FieldRef

        @Override
        public byte[] getReplacementBytes() throws IOException {
            return buildCode(
                getCaptureGroup(1),
                reference(GETSTATIC, new FieldRef(MCPatcherUtils.TILE_SIZE_CLASS, "float_reciprocal", "F")),
                getCaptureGroup(2)
            );
        }
View Full Code Here

Examples of fr.xlim.ssd.capmanipulator.library.FieldRef

        } else {
            //the fied is an instance field
            ClassRef classref = new ClassRefRead().load(in);
            byte tok = in.readByte();

            FieldRef fieldRef = new InstanceField();
            fieldDescriptorInfo.setFieldRef(fieldRef);
            ((InstanceField) fieldRef).setClass_(classref);
            ((InstanceField) fieldRef).setToken(tok);
        }
View Full Code Here

Examples of org.allspice.bytecode.FieldRef

      Var x = new Var(1,new TypeName(type)) ;
      MethodDef md = new MethodDef(TypeName.VOID,"setFoo",x) ;
      md = md.addInstructions(
          new Load(new Var(0,new TypeName("TestClass"))),
          new Load(x),
          new Store(new FieldRef(cd.name,new TypeName(type),"foo")),
          new Return(TypeCode.VOID)
          ) ;
      cd = cd.addMethod(md) ;
    }
    {
      MethodDef md = new MethodDef(new TypeName(type),"getFoo") ;
      md = md.addInstructions(
          new Load(new Var(0,new TypeName("TestClass"))),
          new Load(new FieldRef(cd.name,new TypeName(type),"foo")),
          new Return(TypeCode.getType(type))
          ) ;
      cd = cd.addMethod(md) ;
    }
    return cd ;
View Full Code Here

Examples of org.allspice.bytecode.FieldRef

  private static LValue createLValue(EvaluationContext context, Expr e,String var,
      InstList l, FieldStub fd) throws CompilerException {
    if (!fd.isStatic) {
      context.compile(null,e, l) ;
      return new FieldRef(fd.cl.getTypeName(),fd.type.getTypeName(),var) ;
    }
    else {
      return new StaticFieldRef(fd.cl.getTypeName(),fd.type.getTypeName(),var) ;
    }
  }
View Full Code Here

Examples of org.allspice.bytecode.FieldRef

    for(FieldStub fstub: stub.fields.values()) {
      if (fstub.isStatic) {
        vs = vs.addStaticFieldVar(new FIFO<StaticFieldRef>(new StaticFieldRef(stub.name,fstub.type.getTypeName(),fstub.nm))) ;
      }
      else {
        vs = vs.addFieldVar(new FIFO<FieldRef>(new FieldRef(stub.name,fstub.type.getTypeName(),fstub.nm))) ;
      }
    }
    return vs ;
  }
View Full Code Here

Examples of org.allspice.bytecode.FieldRef

    case fieldref: {
      if (type == TypeCode.VOID) {
        ilc.add(InstructionConstants.POP) ;
      }
      else {
        FieldRef fdef = (FieldRef)lval;
        Type typ = TypeDefConverter.makeType(fdef.getType()) ;
        ilc.add(ilc.getInstructionFactory().createGetField(fdef.clazz.toString(), fdef.name, typ)) ;
      }
      break ;
    }
    case staticref: {
      if (type != TypeCode.VOID) {
        StaticFieldRef fdef = (StaticFieldRef)lval;
        Type typ = TypeDefConverter.makeType(fdef.getType()) ;
        ilc.add(ilc.getInstructionFactory().createGetStatic(fdef.clazz.toString(), fdef.name, typ)) ;
      }
      break ;
    }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.