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

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

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

Bytecode.addLdc2w介绍

[英]Appends LDC2_W. The pushed item is a double value.
[中]追加LDC2_W。推送项是一个双精度值。

代码示例

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

/**
 * Appends LCONST or LCONST_<n>
 *
 * @param n         the pushed long integer constant.
 */
public void addLconst(long n) {
  if (n == 0 || n == 1)
    addOpcode(9 + (int)n);              // lconst_<n>
  else
    addLdc2w(n);
}

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

/**
 * Appends DCONST or DCONST_&lt;n&gt;
 *
 * @param d         the pushed double constant.
 */
public void addDconst(double d) {
  if (d == 0.0 || d == 1.0)
    addOpcode(14 + (int)d);             // dconst_<n>
  else
    addLdc2w(d);
}

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

/**
 * Appends LCONST or LCONST_&lt;n&gt;
 *
 * @param n         the pushed long integer constant.
 */
public void addLconst(long n) {
  if (n == 0 || n == 1)
    addOpcode(9 + (int)n);              // lconst_<n>
  else
    addLdc2w(n);
}

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

/**
 * Appends DCONST or DCONST_&lt;n&gt;
 *
 * @param d         the pushed double constant.
 */
public void addDconst(double d) {
  if (d == 0.0 || d == 1.0)
    addOpcode(14 + (int)d);             // dconst_<n>
  else
    addLdc2w(d);
}

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

int compileIfStatic(CtClass type, String name, Bytecode code,
          Javac drv) throws CannotCompileException
{
  code.addLdc2w(value);
  code.addPutstatic(Bytecode.THIS, name, Descriptor.of(type));
  return 2;   // stack size
}

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

int compileIfStatic(CtClass type, String name, Bytecode code,
          Javac drv) throws CannotCompileException
{
  code.addLdc2w(value);
  code.addPutstatic(Bytecode.THIS, name, Descriptor.of(type));
  return 2;   // stack size
}

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

@Override
int compileIfStatic(CtClass type, String name, Bytecode code,
          Javac drv) throws CannotCompileException
{
  code.addLdc2w(value);
  code.addPutstatic(Bytecode.THIS, name, Descriptor.of(type));
  return 2;   // stack size
}

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

int compile(CtClass type, String name, Bytecode code,
      CtClass[] parameters, Javac drv)
  throws CannotCompileException
{
  code.addAload(0);
  code.addLdc2w(value);
  code.addPutfield(Bytecode.THIS, name, Descriptor.of(type));
  return 3;   // stack size
}

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

@Override
int compileIfStatic(CtClass type, String name, Bytecode code,
          Javac drv) throws CannotCompileException
{
  code.addLdc2w(value);
  code.addPutstatic(Bytecode.THIS, name, Descriptor.of(type));
  return 2;   // stack size
}

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

int compile(CtClass type, String name, Bytecode code,
      CtClass[] parameters, Javac drv)
  throws CannotCompileException
{
  code.addAload(0);
  code.addLdc2w(value);
  code.addPutfield(Bytecode.THIS, name, Descriptor.of(type));
  return 3;   // stack size
}

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

@Override
int compile(CtClass type, String name, Bytecode code,
      CtClass[] parameters, Javac drv)
  throws CannotCompileException
{
  code.addAload(0);
  code.addLdc2w(value);
  code.addPutfield(Bytecode.THIS, name, Descriptor.of(type));
  return 3;   // stack size
}

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

@Override
int compile(CtClass type, String name, Bytecode code,
      CtClass[] parameters, Javac drv)
  throws CannotCompileException
{
  code.addAload(0);
  code.addLdc2w(value);
  code.addPutfield(Bytecode.THIS, name, Descriptor.of(type));
  return 3;   // stack size
}

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

/**
 * Appends DCONST or DCONST_&lt;n&gt;
 *
 * @param d         the pushed double constant.
 */
public void addDconst(double d) {
  if (d == 0.0 || d == 1.0)
    addOpcode(14 + (int)d);             // dconst_<n>
  else
    addLdc2w(d);
}

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

/**
 * Appends LCONST or LCONST_&lt;n&gt;
 *
 * @param n         the pushed long integer constant.
 */
public void addLconst(long n) {
  if (n == 0 || n == 1)
    addOpcode(9 + (int)n);              // lconst_<n>
  else
    addLdc2w(n);
}

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

/**
 * Appends DCONST or DCONST_&lt;n&gt;
 *
 * @param d         the pushed double constant.
 */
public void addDconst(double d) {
  if (d == 0.0 || d == 1.0)
    addOpcode(14 + (int)d);             // dconst_<n>
  else
    addLdc2w(d);
}

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

/**
 * Appends LCONST or LCONST_&lt;n&gt;
 *
 * @param n         the pushed long integer constant.
 */
public void addLconst(long n) {
  if (n == 0 || n == 1)
    addOpcode(9 + (int)n);              // lconst_<n>
  else
    addLdc2w(n);
}

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

int compileIfStatic(CtClass type, String name, Bytecode code,
          Javac drv) throws CannotCompileException
{
  code.addLdc2w(value);
  code.addPutstatic(Bytecode.THIS, name, Descriptor.of(type));
  return 2;   // stack size
}

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

int compileIfStatic(CtClass type, String name, Bytecode code,
          Javac drv) throws CannotCompileException
{
  code.addLdc2w(value);
  code.addPutstatic(Bytecode.THIS, name, Descriptor.of(type));
  return 2;   // stack size
}

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

int compile(CtClass type, String name, Bytecode code,
      CtClass[] parameters, Javac drv)
  throws CannotCompileException
{
  code.addAload(0);
  code.addLdc2w(value);
  code.addPutfield(Bytecode.THIS, name, Descriptor.of(type));
  return 3;   // stack size
}

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

int compile(CtClass type, String name, Bytecode code,
      CtClass[] parameters, Javac drv)
  throws CannotCompileException
{
  code.addAload(0);
  code.addLdc2w(value);
  code.addPutfield(Bytecode.THIS, name, Descriptor.of(type));
  return 3;   // stack size
}

相关文章