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 Details

    • setup

      Object setup(OgnlContext context, Object target, Member member, String propertyName)
      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

      void restore(OgnlContext context, Object target, Member member, String propertyName, Object state)
      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

      boolean isAccessible(OgnlContext context, Object target, Member member, String propertyName)
      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.