add getIntegerValue
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1311 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
This commit is contained in:
parent
35a0fc71f3
commit
1eefd4cf38
|
@ -302,10 +302,16 @@ public class SymbolTable {
|
|||
if (!isNumberConstant(v)) {
|
||||
throw new IllegalArgumentException("value number " + v + " is not a numeric constant.");
|
||||
}
|
||||
|
||||
return ((Number) ((ConstantValue) values[v]).getValue()).doubleValue();
|
||||
}
|
||||
|
||||
public int getIntValue(int v) throws IllegalArgumentException {
|
||||
if (!isNumberConstant(v)) {
|
||||
throw new IllegalArgumentException("value number " + v + " is not a numeric constant.");
|
||||
}
|
||||
return ((Number) ((ConstantValue) values[v]).getValue()).intValue();
|
||||
}
|
||||
|
||||
public Object getConstantValue(int v) throws IllegalArgumentException{
|
||||
if (!isConstant(v)) {
|
||||
throw new IllegalArgumentException("value number " + v + " is not a constant.");
|
||||
|
|
Loading…
Reference in New Issue