Access control in the proxy
The Calendar proxy:private transient Calendar ref; // the hidden resourceprivate Method[] enabledMethods;boolean isFree (TimeRange t){ // Use Java reflection to find the isFree Method object thisMethod = myClass.getMethod (“isFree”,……); if (isEnabled(thisMethod)) return ref.isFree(t); // pass it through to ref else // throw security violation exception}