docs: public static Object calculateValue(Expression e) {
  		if (e instanceof Literal) {
  			((Literal) e).computeConstant();
  			switch (e.constant.typeID()) {
  			case TypeIds.T_int: return e.constant.intValue();
  			case TypeIds.T_byte: return e.constant.byteValue();
  			case TypeIds.T_short: return e.constant.shortValue();
  			case TypeIds.T_char: return e.constant.charValue();
  			case TypeIds.T_float: return e.constant.floatValue();
  			case TypeIds.T_double: return e.constant.doubleValue();
  			case TypeIds.T_boolean: return e.constant.booleanValue();
  			case TypeIds.T_long: return e.constant.longValue();
  			case TypeIds.T_JavaLangString: return e.constant.stringValue();
  			default: return null;
  			}
  		} else if (e instanceof ClassLiteralAccess) {
  			return new ClassLiteral(Eclipse.toQualifiedName(((ClassLiteralAccess) e).type.getTypeName()));
  		} else if (e instanceof SingleNameReference) {
  			return new FieldSelect(new String(((SingleNameReference)e).token));
  		} else if (e instanceof QualifiedNameReference) {
  			String qName = Eclipse.toQualifiedName(((QualifiedNameReference) e).tokens);
  			int idx = qName.lastIndexOf('.');
  			return new FieldSelect(idx == -1 ? qName : qName.substring(idx+1));
  		} else if (e instanceof UnaryExpression) {
  			if ("-".equals(((UnaryExpression) e).operatorToString())) {
  				Object inner = calculateValue(((UnaryExpression) e).expression);
  				if (inner instanceof Integer) return - ((Integer) inner).intValue();
  				if (inner instanceof Byte) return - ((Byte) inner).byteValue();
  				if (inner instanceof Short) return - ((Short) inner).shortValue();
  				if (inner instanceof Long) return - ((Long) inner).longValue();
  				if (inner instanceof Float) return - ((Float) inner).floatValue();
  				if (inner instanceof Double) return - ((Double) inner).doubleValue();
  				return null;
  			}
  		}
  		
  		return null;
  	}