Q1: I think yellow means protected
and red means private
. The "F" means final
.
Q2: That can be done using reflection. Say there is a class C
with a private member field pm
and you want to access instanceOfC.pm
, this is the way to go:
/* exception stuff ommitted (for readability and shortness) */
C instanceOfC = new C();
Class<? extends C> clazz = instanceOfC.getClass();
Field f = clazz.getDeclaredField("pm");
f.setAccessible(true);
... = f.get(instanceOfC); //<-- this will get you the value of `c.pm`
You should probably read the JavaDoc of Class, Field and Method