本文整理汇总了Java中edu.umd.cs.findbugs.OpcodeStack.Item.SpecialKind类的典型用法代码示例。如果您正苦于以下问题:Java SpecialKind类的具体用法?Java SpecialKind怎么用?Java SpecialKind使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
SpecialKind类属于edu.umd.cs.findbugs.OpcodeStack.Item包,在下文中一共展示了SpecialKind类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: pushByFloatMath
import edu.umd.cs.findbugs.OpcodeStack.Item.SpecialKind; //导入依赖的package包/类
private void pushByFloatMath(int seen, Item it, Item it2) {
Item result;
@SpecialKind int specialKind = Item.FLOAT_MATH;
if ((it.getConstant() instanceof Float) && it2.getConstant() instanceof Float) {
if (seen == FADD)
result = new Item("F", Float.valueOf(constantToFloat(it2) + constantToFloat(it)));
else if (seen == FSUB)
result = new Item("F", Float.valueOf(constantToFloat(it2) - constantToFloat(it)));
else if (seen == FMUL)
result = new Item("F", Float.valueOf(constantToFloat(it2) * constantToFloat(it)));
else if (seen == FDIV)
result = new Item("F", Float.valueOf(constantToFloat(it2) / constantToFloat(it)));
else if (seen == FREM)
result = new Item("F", Float.valueOf(constantToFloat(it2) % constantToFloat(it)));
else
result = new Item("F");
} else {
result = new Item("F");
if (seen == DDIV)
specialKind = Item.NASTY_FLOAT_MATH;
}
result.setSpecialKind(specialKind);
push(result);
}
示例2: pushByDoubleMath
import edu.umd.cs.findbugs.OpcodeStack.Item.SpecialKind; //导入依赖的package包/类
private void pushByDoubleMath(int seen, Item it, Item it2) {
Item result;
@SpecialKind int specialKind = Item.FLOAT_MATH;
if ((it.getConstant() instanceof Double) && it2.getConstant() instanceof Double) {
if (seen == DADD)
result = new Item("D", Double.valueOf(constantToDouble(it2) + constantToDouble(it)));
else if (seen == DSUB)
result = new Item("D", Double.valueOf(constantToDouble(it2) - constantToDouble(it)));
else if (seen == DMUL)
result = new Item("D", Double.valueOf(constantToDouble(it2) * constantToDouble(it)));
else if (seen == DDIV)
result = new Item("D", Double.valueOf(constantToDouble(it2) / constantToDouble(it)));
else if (seen == DREM)
result = new Item("D", Double.valueOf(constantToDouble(it2) % constantToDouble(it)));
else
result = new Item("D"); // ?
} else {
result = new Item("D");
if (seen == DDIV)
specialKind = Item.NASTY_FLOAT_MATH;
}
result.setSpecialKind(specialKind);
push(result);
}
示例3: defineNewSpecialKind
import edu.umd.cs.findbugs.OpcodeStack.Item.SpecialKind; //导入依赖的package包/类
public static @SpecialKind
int defineNewSpecialKind(String name) {
specialKindNames.put(nextSpecialKind, name);
@SpecialKind int result = asSpecialKind( nextSpecialKind+1);
nextSpecialKind = result;
return result;
}
示例4: getSpecialKindForAbs
import edu.umd.cs.findbugs.OpcodeStack.Item.SpecialKind; //导入依赖的package包/类
public @SpecialKind int getSpecialKindForAbs() {
switch (getSpecialKind()) {
case Item.HASHCODE_INT:
return Item.MATH_ABS_OF_HASHCODE;
case Item.RANDOM_INT:
return Item.MATH_ABS_OF_RANDOM;
default:
return Item.MATH_ABS;
}
}
示例5: getSpecialKindForRemainder
import edu.umd.cs.findbugs.OpcodeStack.Item.SpecialKind; //导入依赖的package包/类
public @SpecialKind int getSpecialKindForRemainder() {
switch (getSpecialKind()) {
case Item.HASHCODE_INT:
return Item.HASHCODE_INT_REMAINDER;
case Item.RANDOM_INT:
return Item.RANDOM_INT_REMAINDER;
default:
return Item.NOT_SPECIAL;
}
}
示例6: asSpecialKind
import edu.umd.cs.findbugs.OpcodeStack.Item.SpecialKind; //导入依赖的package包/类
static @SpecialKind int asSpecialKind(int kind) {
return kind;
}
示例7: cloneAndSetSpecialKind
import edu.umd.cs.findbugs.OpcodeStack.Item.SpecialKind; //导入依赖的package包/类
public Item cloneAndSetSpecialKind(@SpecialKind int specialKind) {
Item that = new Item(this);
that.specialKind = specialKind;
return that;
}
示例8: getSpecialKind
import edu.umd.cs.findbugs.OpcodeStack.Item.SpecialKind; //导入依赖的package包/类
/**
* @return Returns the specialKind.
*/
public @SpecialKind
int getSpecialKind() {
return specialKind;
}
示例9: setSpecialKind
import edu.umd.cs.findbugs.OpcodeStack.Item.SpecialKind; //导入依赖的package包/类
/**
* @param specialKind
* The specialKind to set.
*/
public void setSpecialKind(@SpecialKind int specialKind) {
this.specialKind = specialKind;
}