Code example for AccessibleObject

Methods: setAccessible

0
        super(); 
        this.cls = cls; 
    } 
 
    public static <T extends AccessibleObject> T accessible(T obj) { 
        obj.setAccessible(true); 
        return obj; 
    } 
 
    public final boolean undeterminable() { 
        return cls.isInterface() || cls.isEnum() || cls.isPrimitive() || cls.isArray() 
                || Modifier.isAbstract(cls.getModifiers()) || cls == String.class 
                || Number.class.isAssignableFrom(cls) || cls == Boolean.class 
                || cls == Void.class || cls == void.class 
                || Collection.class.isAssignableFrom(cls); 
    } 
 
}