Object (@NotNull TraceElement element) { final Value value = element.getValue(); if (!(value instanceof PrimitiveValue)) return value; if (value instanceof IntegerValue) return ((IntegerValue)value).value(); if (value instanceof DoubleValue) return ((DoubleValue)value).value(); if (value instanceof LongValue) return ((LongValue)value).value(); if (value instanceof BooleanValue) return ((BooleanValue)value).value(); if (value instanceof ByteValue) return ((ByteValue)value).value(); if (value instanceof CharValue) return ((CharValue)value).value(); if (value instanceof FloatValue) return ((FloatValue)value).value(); throw new RuntimeException("unknown primitive value: " + value.type().name()); }