Code example for AccessibleObject

Methods: isAccessible, setAccessible

0
    { 
        if (!(accessibleObject instanceof AccessibleObject)) {
            return false; 
        } 
        AccessibleObject accessible = (AccessibleObject)accessibleObject;
        if (accessible.isAccessible()) {
            return true; 
        } 
        try { 
            accessible.setAccessible(true);
        } catch (Exception ex) { }
 
        return accessible.isAccessible();
    } 
 
    @Override 
    protected Object getInterfaceProxyHelper(ContextFactory cf,
                                             Class<?>[] interfaces)
    { 
        // XXX: How to handle interfaces array withclasses from different 
        // class loaders? Using cf.getApplicationClassLoader() ?