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

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

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

Bytecode.addLconst介绍

[英]Appends LCONST or LCONST_<n>
[中]附加LCONST或LCONST

代码示例

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

int compile(Bytecode code) throws CannotCompileException {
  code.addLconst(param);
  return 2;
}

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

@Override
int compile(Bytecode code) throws CannotCompileException {
  code.addLconst(param);
  return 2;
}

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

public void atIntConst(IntConst i) throws CompileError {
  arrayDim = 0;
  long value = i.get();
  int type = i.getType();
  if (type == IntConstant || type == CharConstant) {
    exprType = (type == IntConstant ? INT : CHAR);
    bytecode.addIconst((int)value);
  }
  else {
    exprType = LONG;
    bytecode.addLconst(value);
  }
}

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

@Override
public void atIntConst(IntConst i) throws CompileError {
  arrayDim = 0;
  long value = i.get();
  int type = i.getType();
  if (type == IntConstant || type == CharConstant) {
    exprType = (type == IntConstant ? INT : CHAR);
    bytecode.addIconst((int)value);
  }
  else {
    exprType = LONG;
    bytecode.addLconst(value);
  }
}

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

code.addPutstatic(classname, HOLDER, HOLDER_TYPE);
code.addLconst(SERIAL_VERSION_UID_VALUE);
code.addPutstatic(classname, SERIAL_VERSION_UID_FIELD, SERIAL_VERSION_UID_TYPE);
code.addOpcode(Bytecode.RETURN);

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

protected void atPlusPlusCore(int dup_code, boolean doDup,
               int token, boolean isPost,
               Expr expr) throws CompileError
{
  int t = exprType;
  if (doDup && isPost)
    bytecode.addOpcode(dup_code);
  if (t == INT || t == BYTE || t == CHAR || t == SHORT) {
    bytecode.addIconst(1);
    bytecode.addOpcode(token == PLUSPLUS ? IADD : ISUB);
    exprType = INT;
  }
  else if (t == LONG) {
    bytecode.addLconst((long)1);
    bytecode.addOpcode(token == PLUSPLUS ? LADD : LSUB);
  }
  else if (t == FLOAT) {
    bytecode.addFconst(1.0f);
    bytecode.addOpcode(token == PLUSPLUS ? FADD : FSUB);
  }
  else if (t == DOUBLE) {
    bytecode.addDconst(1.0);
    bytecode.addOpcode(token == PLUSPLUS ? DADD : DSUB);
  }
  else
    badType(expr);
  if (doDup && !isPost)
    bytecode.addOpcode(dup_code);
}

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

protected void atPlusPlusCore(int dup_code, boolean doDup,
               int token, boolean isPost,
               Expr expr) throws CompileError
{
  int t = exprType;
  if (doDup && isPost)
    bytecode.addOpcode(dup_code);
  if (t == INT || t == BYTE || t == CHAR || t == SHORT) {
    bytecode.addIconst(1);
    bytecode.addOpcode(token == PLUSPLUS ? IADD : ISUB);
    exprType = INT;
  }
  else if (t == LONG) {
    bytecode.addLconst(1);
    bytecode.addOpcode(token == PLUSPLUS ? LADD : LSUB);
  }
  else if (t == FLOAT) {
    bytecode.addFconst(1.0f);
    bytecode.addOpcode(token == PLUSPLUS ? FADD : FSUB);
  }
  else if (t == DOUBLE) {
    bytecode.addDconst(1.0);
    bytecode.addOpcode(token == PLUSPLUS ? DADD : DSUB);
  }
  else
    badType(expr);
  if (doDup && !isPost)
    bytecode.addOpcode(dup_code);
}

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

b.addLconst(0);
b.addLstore(returnVarNo);

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

bytecode.addLconst(-1);
bytecode.addOpcode(LXOR);

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

code.addPutstatic(classname, HOLDER, HOLDER_TYPE);
code.addLconst(SERIAL_VERSION_UID_VALUE);
code.addPutstatic(classname, SERIAL_VERSION_UID_FIELD, SERIAL_VERSION_UID_TYPE);
code.addOpcode(Bytecode.RETURN);

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

b.addLconst(0);
b.addLstore(returnVarNo);

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

bytecode.addLconst(-1);
bytecode.addOpcode(LXOR);

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

bytecode.addOpcode(DUP2);
bytecode.addLconst((long)1);
bytecode.addOpcode(token == PLUSPLUS ? LADD : LSUB);
if (doDup && !isPost)

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

bytecode.addOpcode(DUP2);
bytecode.addLconst(1);
bytecode.addOpcode(token == PLUSPLUS ? LADD : LSUB);
if (doDup && !isPost)

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

int compile(Bytecode code) throws CannotCompileException {
  code.addLconst(param);
  return 2;
}

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

int compile(Bytecode code) throws CannotCompileException {
  code.addLconst(param);
  return 2;
}

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

int compile(Bytecode code) throws CannotCompileException {
  code.addLconst(param);
  return 2;
}

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

int compile(Bytecode code) throws CannotCompileException {
  code.addLconst(param);
  return 2;
}

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

public void atIntConst(IntConst i) throws CompileError {
  arrayDim = 0;
  long value = i.get();
  int type = i.getType();
  if (type == IntConstant || type == CharConstant) {
    exprType = (type == IntConstant ? INT : CHAR);
    bytecode.addIconst((int)value);
  }
  else {
    exprType = LONG;
    bytecode.addLconst(value);
  }
}

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

public void atIntConst(IntConst i) throws CompileError {
  arrayDim = 0;
  long value = i.get();
  int type = i.getType();
  if (type == IntConstant || type == CharConstant) {
    exprType = (type == IntConstant ? INT : CHAR);
    bytecode.addIconst((int)value);
  }
  else {
    exprType = LONG;
    bytecode.addLconst(value);
  }
}

相关文章