Interface MemberAccess
- All Known Implementing Classes:
AbstractMemberAccess
public interface MemberAccess
This interface provides a hook for preparing for accessing members
of objects. The Java2 version of this method can allow access
to otherwise inaccessible members, such as private fields.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanisAccessible(OgnlContext context, Object target, Member member, String propertyName) Returns true if the given member is accessible or can be made accessible by this object.voidRestores the member from the previous setup call.setup(OgnlContext context, Object target, Member member, String propertyName) Sets the member up for accessibility
-
Method Details
-
setup
Sets the member up for accessibility- Parameters:
context- the current execution context.target- the Object upon which to perform the setup operation.member- the Member upon which to perform the setup operation.propertyName- the property upon which to perform the setup operation.- Returns:
- the Object representing the original accessibility state of the target prior to the setup operation.
-
restore
Restores the member from the previous setup call.- Parameters:
context- the current execution context.target- the Object upon which to perform the setup operation.member- the Member upon which to perform the setup operation.propertyName- the property upon which to perform the setup operation.state- the Object holding the state to restore (target state prior to the setup operation).
-
isAccessible
Returns true if the given member is accessible or can be made accessible by this object.- Parameters:
context- the current execution context.target- the Object to test accessibility for.member- the Member to test accessibility for.propertyName- the property to test accessibility for.- Returns:
- true if the target/member/propertyName is accessible in the context, false otherwise.
-