Open ferstl opened 5 years ago
Hi Stefan!
Any particular reason you want to do this?
Hi,
I am trying to read flight recorder events with the API in Mission Control. When I read an attribute of an event it would be good to know if the underlying value is a Long or a Double. Having access to LongStored
and DoubleStored
I could do an instanceof
check. Or is there another way to find out the type? I saw that Mission Control does also make such instanceof
checks, e.g. in LinearKindOfQuantity
.
The classes
LongStored
andDoubleStored
are not accessible outside the packageorg.openjdk.jmc.common.unit
. The reason for this is that these are inner static classes ofScalarQuantity
which is has only package-private visibility. Trying to access these classes leads to a compile error:A fix would be to make
ScalarQuantity
public. I'd like to access theLongStored
andDoubleStored
classes in order to find out if the underlying value of an attribute is a long or a double with an instanceof check.