This came up when using image-related classes in the Android API.
Usually I would access the 'id' column like this:
However, I can't do this. _ID isn't defined on the Media class:
org.apache.tools.ant.BuildException: org.jruby.exceptions.RaiseException: (NoMethodError) Cannot find static method _ID() on android.provider.MediaStore$Images$Media
It's on a superclass of Media called BaseColumns.
I can simply import BaseColumns and use it directly. But if a later Android version decides to change Media and override the _ID value, my code will break.
this should be pretty similar to the subclass static method lookup stuff.
add inherited lookup to static fields
now GregorianCalendar.AM will find Calendar.AM
This is needed for improved android support. Android uses static field inheritance as a way of providing some API flexibility.