Package org.objectweb.asm.tree

Examples of org.objectweb.asm.tree.LdcInsnNode


        return this;
    }

    public MethodDefinition loadConstant(String value)
    {
        instructionList.add(new LdcInsnNode(value));
        return this;
    }
View Full Code Here


                break;
            case 5:
                instructionList.add(new InsnNode(ICONST_5));
                break;
            default:
                instructionList.add(new LdcInsnNode(value));
                break;
        }
        return this;
    }
View Full Code Here

 
  @Override
  public boolean accept(AbstractInsnNode t) {
    if (!(t instanceof LdcInsnNode))
      return false;
    LdcInsnNode ldc = (LdcInsnNode) t;
    return filter.accept(ldc.cst);
  }
View Full Code Here

      case NEWARRAY:
        return new IntInsnNode(opcode, getOperandTypeFromString(args[1]));

      case LDC:
        if (args[1].charAt(0) == '"') {
          return new LdcInsnNode(args[1].replace("\\n", "\n").substring(1));
        } else if (args[1].charAt(0) == 'L' && args[1].charAt(args[1].length()) == ';') {
          return new LdcInsnNode(Type.getType(args[1]));
        } else {
          System.out.println(args[1]);
          char c = args[1].charAt(args[1].length());
          switch (c) {
            case 'D':
            case 'd':
              return new LdcInsnNode(todouble(args[1]));
            case 'F':
            case 'f':
              return new LdcInsnNode(tofloat(args[1]));
            case 'L':
            case 'l':
              return new LdcInsnNode(tolong(args[1]));
            default:
              return new LdcInsnNode(toint(args[1]));
          }
        }

      case NEW:
      case ANEWARRAY:
View Full Code Here

          break;
        case AbstractInsnNode.LOOKUPSWITCH_INSN:
        case AbstractInsnNode.INSN:
          break;
        case AbstractInsnNode.LDC_INSN:
          LdcInsnNode lin = (LdcInsnNode) ain;
          if (lin.cst instanceof String) {
            fullInsn += " \"" + ((String) lin.cst).replace("\n", "\\n") + "\"";
          } else if (lin.cst instanceof Type) {
            fullInsn += ' ' + ((Type) lin.cst).getDescriptor();
          } else {
View Full Code Here

   
  @Override
    public LdcInsnNode deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {
    JsonObject jsonObject = (JsonObject) json;
        Object cst = context.deserialize(jsonObject.get("cst"), Object.class);
        return new LdcInsnNode(cst);
    }
View Full Code Here

TOP

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

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.