add getIntegerValue

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1311 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
This commit is contained in:
sjfink 2007-06-25 18:56:14 +00:00
parent 35a0fc71f3
commit 1eefd4cf38
1 changed files with 7 additions and 1 deletions

View File

@ -302,9 +302,15 @@ 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)) {