|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.ognl.DefaultMemberAccess
public class DefaultMemberAccess
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.
Constructor Summary | |
---|---|
DefaultMemberAccess(boolean allowAllAccess)
|
|
DefaultMemberAccess(boolean allowPrivateAccess,
boolean allowProtectedAccess,
boolean allowPackageProtectedAccess)
|
Method Summary | |
---|---|
boolean |
getAllowPackageProtectedAccess()
|
boolean |
getAllowPrivateAccess()
|
boolean |
getAllowProtectedAccess()
|
boolean |
isAccessible(Map<String,Object> context,
Object target,
Member member,
String propertyName)
Returns true if the given member is accessible or can be made accessible by this object. |
void |
restore(Map<String,Object> context,
Object target,
Member member,
String propertyName,
Object state)
Restores the member from the previous setup call. |
void |
setAllowPackageProtectedAccess(boolean value)
|
void |
setAllowPrivateAccess(boolean value)
|
void |
setAllowProtectedAccess(boolean value)
|
Object |
setup(Map<String,Object> context,
Object target,
Member member,
String propertyName)
Sets the member up for accessibility |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultMemberAccess(boolean allowAllAccess)
public DefaultMemberAccess(boolean allowPrivateAccess, boolean allowProtectedAccess, boolean allowPackageProtectedAccess)
Method Detail |
---|
public boolean getAllowPrivateAccess()
public void setAllowPrivateAccess(boolean value)
public boolean getAllowProtectedAccess()
public void setAllowProtectedAccess(boolean value)
public boolean getAllowPackageProtectedAccess()
public void setAllowPackageProtectedAccess(boolean value)
public Object setup(Map<String,Object> context, Object target, Member member, String propertyName)
MemberAccess
setup
in interface MemberAccess
public void restore(Map<String,Object> context, Object target, Member member, String propertyName, Object state)
MemberAccess
restore
in interface MemberAccess
public boolean isAccessible(Map<String,Object> context, Object target, Member member, String propertyName)
isAccessible
in interface MemberAccess
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |