javassist.bytecode.Bytecode.addLstore()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(5.6k)|赞(0)|评价(0)|浏览(102)

本文整理了Java中javassist.bytecode.Bytecode.addLstore()方法的一些代码示例,展示了Bytecode.addLstore()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Bytecode.addLstore()方法的具体详情如下:
包路径:javassist.bytecode.Bytecode
类名称:Bytecode
方法名:addLstore

Bytecode.addLstore介绍

[英]Appends LSTORE or LSTORE_<n>
[中]附加LSTORE或LSTORE

代码示例

代码示例来源:origin: redisson/redisson

addIstore(n);
else if (type == CtClass.longType) {
  addLstore(n);
  return 2;

代码示例来源:origin: redisson/redisson

protected boolean doit(Bytecode b, int opcode) {
    switch (opcode) {
    case Opcode.RETURN :
      break;
    case ARETURN :
      b.addAstore(var);
      break;
    case IRETURN :
      b.addIstore(var);
      break;
    case LRETURN :
      b.addLstore(var);
      break;
    case DRETURN :
      b.addDstore(var);
      break;
    case FRETURN :
      b.addFstore(var);
      break;
    default :
      throw new RuntimeException("fatal");
    }
    b.addOpcode(Opcode.GOTO);
    b.addIndex(target - b.currentPc() + 3);
    return true;
  }
}

代码示例来源:origin: org.javassist/javassist

addIstore(n);
else if (type == CtClass.longType) {
  addLstore(n);
  return 2;

代码示例来源:origin: org.javassist/javassist

@Override
  protected boolean doit(Bytecode b, int opcode) {
    switch (opcode) {
    case Opcode.RETURN :
      break;
    case ARETURN :
      b.addAstore(var);
      break;
    case IRETURN :
      b.addIstore(var);
      break;
    case LRETURN :
      b.addLstore(var);
      break;
    case DRETURN :
      b.addDstore(var);
      break;
    case FRETURN :
      b.addFstore(var);
      break;
    default :
      throw new RuntimeException("fatal");
    }
    b.addOpcode(Opcode.GOTO);
    b.addIndex(target - b.currentPc() + 3);
    return true;
  }
}

代码示例来源:origin: redisson/redisson

break;
case LRETURN :
  b.addLstore(getVar(2));
  jsrJmp(b);
  b.addLload(var);

代码示例来源:origin: redisson/redisson

bytecode.addFstore(varNo);
else if (varType == LONG)
  bytecode.addLstore(varNo);
else if (isRefType(varType))
  bytecode.addAstore(varNo);

代码示例来源:origin: org.javassist/javassist

break;
case LRETURN :
  b.addLstore(getVar(2));
  jsrJmp(b);
  b.addLload(var);

代码示例来源:origin: org.javassist/javassist

bytecode.addFstore(varNo);
else if (varType == LONG)
  bytecode.addLstore(varNo);
else if (isRefType(varType))
  bytecode.addAstore(varNo);

代码示例来源:origin: redisson/redisson

b.addLstore(returnVarNo);

代码示例来源:origin: org.javassist/javassist

b.addLstore(returnVarNo);

代码示例来源:origin: redisson/redisson

bytecode.addOpcode(DUP2);
bytecode.addLstore(var);

代码示例来源:origin: org.javassist/javassist

bytecode.addOpcode(DUP2);
bytecode.addLstore(var);

代码示例来源:origin: org.hibernate/com.springsource.org.hibernate

private static void addTypeDependDataStore(Bytecode code, String typeName,
                      int i) {
  if ((typeName.charAt(0) == 'L')
    && (typeName.charAt(typeName.length() - 1) == ';')
    || (typeName.charAt(0) == '[')) {
    // reference type
    code.addAstore(i);
  } else if (typeName.equals("Z") || typeName.equals("B")
        || typeName.equals("C") || typeName.equals("I")
        || typeName.equals("S")) {
    // boolean, byte, char, int, short
    code.addIstore(i);
  } else if (typeName.equals("D")) {
    // double
    code.addDstore(i);
  } else if (typeName.equals("F")) {
    // float
    code.addFstore(i);
  } else if (typeName.equals("J")) {
    // long
    code.addLstore(i);
  } else {
    // bad type
    throw new RuntimeException("bad type: " + typeName);
  }
}

代码示例来源:origin: org.hibernate/com.springsource.org.hibernate.core

private static void addTypeDependDataStore(Bytecode code, String typeName,
                      int i) {
  if ((typeName.charAt(0) == 'L')
    && (typeName.charAt(typeName.length() - 1) == ';')
    || (typeName.charAt(0) == '[')) {
    // reference type
    code.addAstore(i);
  } else if (typeName.equals("Z") || typeName.equals("B")
        || typeName.equals("C") || typeName.equals("I")
        || typeName.equals("S")) {
    // boolean, byte, char, int, short
    code.addIstore(i);
  } else if (typeName.equals("D")) {
    // double
    code.addDstore(i);
  } else if (typeName.equals("F")) {
    // float
    code.addFstore(i);
  } else if (typeName.equals("J")) {
    // long
    code.addLstore(i);
  } else {
    // bad type
    throw new RuntimeException("bad type: " + typeName);
  }
}

代码示例来源:origin: hstaudacher/osgi-jax-rs-connector

addIstore(n);
else if (type == CtClass.longType) {
  addLstore(n);
  return 2;

代码示例来源:origin: com.eclipsesource.jaxrs/jersey-all

addIstore(n);
else if (type == CtClass.longType) {
  addLstore(n);
  return 2;

代码示例来源:origin: hstaudacher/osgi-jax-rs-connector

protected boolean doit(Bytecode b, int opcode) {
    switch (opcode) {
    case Opcode.RETURN :
      break;
    case ARETURN :
      b.addAstore(var);
      break;
    case IRETURN :
      b.addIstore(var);
      break;
    case LRETURN :
      b.addLstore(var);
      break;
    case DRETURN :
      b.addDstore(var);
      break;
    case FRETURN :
      b.addFstore(var);
      break;
    default :
      throw new RuntimeException("fatal");
    }
    b.addOpcode(Opcode.GOTO);
    b.addIndex(target - b.currentPc() + 3);
    return true;
  }
}

代码示例来源:origin: com.eclipsesource.jaxrs/jersey-all

protected boolean doit(Bytecode b, int opcode) {
    switch (opcode) {
    case Opcode.RETURN :
      break;
    case ARETURN :
      b.addAstore(var);
      break;
    case IRETURN :
      b.addIstore(var);
      break;
    case LRETURN :
      b.addLstore(var);
      break;
    case DRETURN :
      b.addDstore(var);
      break;
    case FRETURN :
      b.addFstore(var);
      break;
    default :
      throw new RuntimeException("fatal");
    }
    b.addOpcode(Opcode.GOTO);
    b.addIndex(target - b.currentPc() + 3);
    return true;
  }
}

代码示例来源:origin: hstaudacher/osgi-jax-rs-connector

protected boolean doit(Bytecode b, int opcode) {
    switch (opcode) {
    case Opcode.RETURN :
      break;
    case ARETURN :
      b.addAstore(var);
      break;
    case IRETURN :
      b.addIstore(var);
      break;
    case LRETURN :
      b.addLstore(var);
      break;
    case DRETURN :
      b.addDstore(var);
      break;
    case FRETURN :
      b.addFstore(var);
      break;
    default :
      throw new RuntimeException("fatal");
    }
    b.addOpcode(Opcode.GOTO);
    b.addIndex(target - b.currentPc() + 3);
    return true;
  }
}

代码示例来源:origin: org.jboss/javassist

protected boolean doit(Bytecode b, int opcode) {
    switch (opcode) {
    case Opcode.RETURN :
      break;
    case ARETURN :
      b.addAstore(var);
      break;
    case IRETURN :
      b.addIstore(var);
      break;
    case LRETURN :
      b.addLstore(var);
      break;
    case DRETURN :
      b.addDstore(var);
      break;
    case FRETURN :
      b.addFstore(var);
      break;
    default :
      throw new RuntimeException("fatal");
    }
    b.addOpcode(Opcode.GOTO);
    b.addIndex(target - b.currentPc() + 3);
    return true;
  }
}

相关文章