/** * Return the string value of this constant, or null if not set. */ public String getStringValue() { return (String) getValue(); }
/** * Return the class value of this constant, or null if not set. */ public String getClassNameValue() { return (String) getValue(); }
/** * Return the string value of this constant, or null if not set. */ public String getStringValue() { return (String) getValue(); }
/** * Return the class value of this constant, or null if not set. */ public String getClassNameValue() { return (String) getValue(); }
/** * Return the int value of this constant, or 0 if not set. */ public int getIntValue() { Object value = getValue(); return (value == null) ? 0 : ((Number) value).intValue(); }
/** * Return the double value of this constant, or 0 if not set. */ public double getDoubleValue() { Object value = getValue(); return (value == null) ? 0D : ((Number) value).doubleValue(); }
/** * Return the float value of this constant, or 0 if not set. */ public float getFloatValue() { Object value = getValue(); return (value == null) ? 0F : ((Number) value).floatValue(); }
/** * Return the long value of this constant, or 0 if not set. */ public long getLongValue() { Object value = getValue(); return (value == null) ? 0L : ((Number) value).longValue(); }
/** * Return the double value of this constant, or 0 if not set. */ public double getDoubleValue() { Object value = getValue(); return (value == null) ? 0D : ((Number) value).doubleValue(); }
/** * Return the long value of this constant, or 0 if not set. */ public long getLongValue() { Object value = getValue(); return (value == null) ? 0L : ((Number) value).longValue(); }
/** * Return the float value of this constant, or 0 if not set. */ public float getFloatValue() { Object value = getValue(); return (value == null) ? 0F : ((Number) value).floatValue(); }
/** * Return the int value of this constant, or 0 if not set. */ public int getIntValue() { Object value = getValue(); return (value == null) ? 0 : ((Number) value).intValue(); }
public void enterConstantInstruction(ConstantInstruction obj) { _out.print("<" + obj.getValue() + ">"); }
public void enterConstantInstruction(ConstantInstruction obj) { _out.print("<" + obj.getValue() + ">"); }
/** * ConstantInstructions are equal if the const they reference is the same, * or if the const of either is unset. */ public boolean equalsInstruction(Instruction other) { if (this == other) return true; if (!(other instanceof ConstantInstruction)) return false; ConstantInstruction ci = (ConstantInstruction) other; Object value = getValue(); Object otherValue = ci.getValue(); if (value == null || otherValue == null) return true; if (getTypeName() == null || ci.getTypeName() == null) return true; return value.equals(otherValue) && getTypeName().equals(ci.getTypeName()); }
/** * ConstantInstructions are equal if the const they reference is the same, * or if the const of either is unset. */ public boolean equalsInstruction(Instruction other) { if (this == other) return true; if (!(other instanceof ConstantInstruction)) return false; ConstantInstruction ci = (ConstantInstruction) other; Object value = getValue(); Object otherValue = ci.getValue(); if (value == null || otherValue == null) return true; if (getTypeName() == null || ci.getTypeName() == null) return true; return value.equals(otherValue) && getTypeName().equals(ci.getTypeName()); }
void read(Instruction orig) { super.read(orig); ConstantInstruction ci = (ConstantInstruction) orig; calculateOpcode(ci.getValue(), Class.class.getName().equals(ci.getTypeName()), ci.getOpcode() == Constants.LDCW); }
void read(Instruction orig) { super.read(orig); ConstantInstruction ci = (ConstantInstruction) orig; calculateOpcode(ci.getValue(), Class.class.getName().equals(ci.getTypeName()), ci.getOpcode() == Constants.LDCW); }