// Get the class of the owner and test the modifiers of the field.
Class ownerClass;
boolean isStatic;
try {
ownerClass = owner.toClass(state.getClassLoader());
Field field = ownerClass.getDeclaredField(name.getIdentifier());
int modifiers = field.getModifiers();
if (!java.lang.reflect.Modifier.isPrivate(modifiers)) {