Android LinkedHashMap.eldest() method is NOT available

android, linkedhashmap

Solution

It is a hidden method - invokable using reflection, but isn't part of the public API and therefore likely to change between versions of android

https://android.googlesource.com/platform/libcore/+/a47f800/luni/src/main/java/java/util/LinkedHashMap.java line 169 the @hide annotation stops it from being visible to the public

Problem

I see the LinkedHashMap.eldest() method when attaching the source but cannot use it. Any idea why it isn't available?

Original source