Package ognl
Class DefaultMemberAccess
java.lang.Object
ognl.DefaultMemberAccess
- All Implemented Interfaces:
MemberAccess
This class provides methods for setting up and restoring
access in a Field. Java 2 provides access utilities for setting
and getting fields that are non-public. This object provides
coarse-grained access controls to allow access to private, protected
and package protected members. This will apply to all classes
and members.
- Version:
- 15 October 1999
- Author:
- Luke Blanshard (blanshlu@netscape.net), Drew Davidson (drew@ognl.org)
-
Field Summary
FieldsModifier and TypeFieldDescriptionboolean
boolean
boolean
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultMemberAccess
(boolean allowAllAccess) DefaultMemberAccess
(boolean allowPrivateAccess, boolean allowProtectedAccess, boolean allowPackageProtectedAccess) -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
boolean
boolean
isAccessible
(Map context, Object target, Member member, String propertyName) Returns true if the given member is accessible or can be made accessible by this object.void
Restores the member from the previous setup call.void
setAllowPackageProtectedAccess
(boolean value) void
setAllowPrivateAccess
(boolean value) void
setAllowProtectedAccess
(boolean value) Sets the member up for accessibility
-
Field Details
-
allowPrivateAccess
public boolean allowPrivateAccess -
allowProtectedAccess
public boolean allowProtectedAccess -
allowPackageProtectedAccess
public boolean allowPackageProtectedAccess
-
-
Constructor Details
-
DefaultMemberAccess
public DefaultMemberAccess(boolean allowAllAccess) -
DefaultMemberAccess
public DefaultMemberAccess(boolean allowPrivateAccess, boolean allowProtectedAccess, boolean allowPackageProtectedAccess)
-
-
Method Details
-
getAllowPrivateAccess
public boolean getAllowPrivateAccess() -
setAllowPrivateAccess
public void setAllowPrivateAccess(boolean value) -
getAllowProtectedAccess
public boolean getAllowProtectedAccess() -
setAllowProtectedAccess
public void setAllowProtectedAccess(boolean value) -
getAllowPackageProtectedAccess
public boolean getAllowPackageProtectedAccess() -
setAllowPackageProtectedAccess
public void setAllowPackageProtectedAccess(boolean value) -
setup
Description copied from interface:MemberAccess
Sets the member up for accessibility- Specified by:
setup
in interfaceMemberAccess
-
restore
Description copied from interface:MemberAccess
Restores the member from the previous setup call.- Specified by:
restore
in interfaceMemberAccess
-
isAccessible
Returns true if the given member is accessible or can be made accessible by this object.- Specified by:
isAccessible
in interfaceMemberAccess
-