本文整理了Java中javassist.bytecode.Bytecode.addDconst()
方法的一些代码示例,展示了Bytecode.addDconst()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Bytecode.addDconst()
方法的具体详情如下:
包路径:javassist.bytecode.Bytecode
类名称:Bytecode
方法名:addDconst
[英]Appends DCONST or DCONST_<n>
[中]附加DCONST或DCONST
代码示例来源: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
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
char c = ((CtPrimitiveType)rtype).getDescriptor();
if (c == 'D') {
b.addDconst(0.0);
b.addDstore(returnVarNo);
代码示例来源:origin: org.javassist/javassist
char c = ((CtPrimitiveType)rtype).getDescriptor();
if (c == 'D') {
b.addDconst(0.0);
b.addDstore(returnVarNo);
代码示例来源:origin: redisson/redisson
bytecode.addOpcode(DUP2);
bytecode.addDconst(1.0);
bytecode.addOpcode(token == PLUSPLUS ? DADD : DSUB);
if (doDup && !isPost)
代码示例来源:origin: org.javassist/javassist
bytecode.addOpcode(DUP2);
bytecode.addDconst(1.0);
bytecode.addOpcode(token == PLUSPLUS ? DADD : DSUB);
if (doDup && !isPost)
代码示例来源:origin: hstaudacher/osgi-jax-rs-connector
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
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());
}
}
}
代码示例来源:origin: hstaudacher/osgi-jax-rs-connector
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: hstaudacher/osgi-jax-rs-connector
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: hstaudacher/osgi-jax-rs-connector
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: com.eclipsesource.jaxrs/jersey-all
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.jboss/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((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.jboss.javassist/com.springsource.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((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.jboss/javassist
char c = ((CtPrimitiveType)rtype).getDescriptor();
if (c == 'D') {
b.addDconst(0.0);
b.addDstore(returnVarNo);
代码示例来源:origin: org.jboss.javassist/com.springsource.javassist
char c = ((CtPrimitiveType)rtype).getDescriptor();
if (c == 'D') {
b.addDconst(0.0);
b.addDstore(returnVarNo);
内容来源于网络,如有侵权,请联系作者删除!