本文整理了Java中javassist.bytecode.Bytecode.addFconst()
方法的一些代码示例,展示了Bytecode.addFconst()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Bytecode.addFconst()
方法的具体详情如下:
包路径:javassist.bytecode.Bytecode
类名称:Bytecode
方法名:addFconst
[英]Appends FCONST or FCONST_<n>
[中]附加FCONST或FCONST
代码示例来源:origin: redisson/redisson
int compileIfStatic(CtClass type, String name, Bytecode code,
Javac drv) throws CannotCompileException
{
code.addFconst(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.addFconst(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.addFconst(value);
code.addPutfield(Bytecode.THIS, name, Descriptor.of(type));
return 3; // stack size
}
代码示例来源:origin: redisson/redisson
public void atDoubleConst(DoubleConst d) throws CompileError {
arrayDim = 0;
if (d.getType() == DoubleConstant) {
exprType = DOUBLE;
bytecode.addDconst(d.get());
}
else {
exprType = FLOAT;
bytecode.addFconst((float)d.get());
}
}
}
代码示例来源:origin: org.javassist/javassist
@Override
int compile(CtClass type, String name, Bytecode code,
CtClass[] parameters, Javac drv)
throws CannotCompileException
{
code.addAload(0);
code.addFconst(value);
code.addPutfield(Bytecode.THIS, name, Descriptor.of(type));
return 3; // stack size
}
代码示例来源:origin: org.javassist/javassist
@Override
public void atDoubleConst(DoubleConst d) throws CompileError {
arrayDim = 0;
if (d.getType() == DoubleConstant) {
exprType = DOUBLE;
bytecode.addDconst(d.get());
}
else {
exprType = FLOAT;
bytecode.addFconst((float)d.get());
}
}
}
代码示例来源: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.addFconst(0);
b.addFstore(returnVarNo);
代码示例来源:origin: org.javassist/javassist
b.addFconst(0);
b.addFstore(returnVarNo);
代码示例来源:origin: redisson/redisson
bytecode.addOpcode(DUP);
bytecode.addFconst(1.0f);
bytecode.addOpcode(token == PLUSPLUS ? FADD : FSUB);
if (doDup && !isPost)
代码示例来源:origin: org.javassist/javassist
bytecode.addOpcode(DUP);
bytecode.addFconst(1.0f);
bytecode.addOpcode(token == PLUSPLUS ? FADD : FSUB);
if (doDup && !isPost)
代码示例来源:origin: org.jboss.javassist/com.springsource.javassist
int compileIfStatic(CtClass type, String name, Bytecode code,
Javac drv) throws CannotCompileException
{
code.addFconst(value);
code.addPutstatic(Bytecode.THIS, name, Descriptor.of(type));
return 2; // stack size
}
代码示例来源:origin: org.jboss/javassist
int compileIfStatic(CtClass type, String name, Bytecode code,
Javac drv) throws CannotCompileException
{
code.addFconst(value);
code.addPutstatic(Bytecode.THIS, name, Descriptor.of(type));
return 2; // stack size
}
代码示例来源:origin: com.eclipsesource.jaxrs/jersey-all
int compileIfStatic(CtClass type, String name, Bytecode code,
Javac drv) throws CannotCompileException
{
code.addFconst(value);
code.addPutstatic(Bytecode.THIS, name, Descriptor.of(type));
return 2; // stack size
}
代码示例来源:origin: com.eclipsesource.jaxrs/jersey-all
int compile(CtClass type, String name, Bytecode code,
CtClass[] parameters, Javac drv)
throws CannotCompileException
{
code.addAload(0);
code.addFconst(value);
code.addPutfield(Bytecode.THIS, name, Descriptor.of(type));
return 3; // stack size
}
代码示例来源:origin: org.jboss/javassist
int compile(CtClass type, String name, Bytecode code,
CtClass[] parameters, Javac drv)
throws CannotCompileException
{
code.addAload(0);
code.addFconst(value);
code.addPutfield(Bytecode.THIS, name, Descriptor.of(type));
return 3; // stack size
}
代码示例来源:origin: org.jboss/javassist
public void atDoubleConst(DoubleConst d) throws CompileError {
arrayDim = 0;
if (d.getType() == DoubleConstant) {
exprType = DOUBLE;
bytecode.addDconst(d.get());
}
else {
exprType = FLOAT;
bytecode.addFconst((float)d.get());
}
}
}
代码示例来源:origin: com.eclipsesource.jaxrs/jersey-all
public void atDoubleConst(DoubleConst d) throws CompileError {
arrayDim = 0;
if (d.getType() == DoubleConstant) {
exprType = DOUBLE;
bytecode.addDconst(d.get());
}
else {
exprType = FLOAT;
bytecode.addFconst((float)d.get());
}
}
}
代码示例来源:origin: org.jboss.javassist/com.springsource.javassist
public void atDoubleConst(DoubleConst d) throws CompileError {
arrayDim = 0;
if (d.getType() == DoubleConstant) {
exprType = DOUBLE;
bytecode.addDconst(d.get());
}
else {
exprType = FLOAT;
bytecode.addFconst((float)d.get());
}
}
}
内容来源于网络,如有侵权,请联系作者删除!