// }
//
public static long getIntegerValue(NumberLiteral node) {
Object constant = node.resolveConstantExpressionValue();
if (constant == null)
throw new DomainException("Hmm");
if (constant instanceof Integer)
return (Integer) constant;
if (constant instanceof Long)
return (Long) constant;
if (constant instanceof Short)
return (Short) constant;
if (constant instanceof Byte)
return (Byte) constant;
throw new DomainException("Unhandled number literal type '%s'(%s)", constant, constant.getClass());
}