Class BasicFiledFilter

  • All Implemented Interfaces:
    FieldFilter

    public class BasicFiledFilter
    extends java.lang.Object
    implements FieldFilter
    A basic implementation of the FieldFilter interface that permits all operations on fields. This implementation returns true for all checks, indicating that any field can be used, read, and written. It serves as a default or fallback strategy when no specific field filtering logic is required.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static BasicFiledFilter SINGLETON
      A singleton instance of BasicFieldFilter.
    • Constructor Summary

      Constructors 
      Constructor Description
      BasicFiledFilter()
      default constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean canRead​(java.lang.reflect.Field field)
      Always allows reading the specified field.
      boolean canUse​(java.lang.reflect.Field field)
      Always allows using the specified field.
      boolean canUse​(java.lang.reflect.Field field, java.lang.reflect.Method method)
      Always allows using the specified field in conjunction with a method.
      boolean canWrite​(java.lang.reflect.Field field)
      Always allows writing to the specified field.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • SINGLETON

        public static final BasicFiledFilter SINGLETON
        A singleton instance of BasicFieldFilter. Since the filter does not maintain any state and allows all operations, it can be reused across the application.
    • Constructor Detail

      • BasicFiledFilter

        public BasicFiledFilter()
        default constructor
    • Method Detail

      • canUse

        public boolean canUse​(java.lang.reflect.Field field)
        Always allows using the specified field.
        Specified by:
        canUse in interface FieldFilter
        Parameters:
        field - The field to check.
        Returns:
        Always returns true.
      • canUse

        public boolean canUse​(java.lang.reflect.Field field,
                              java.lang.reflect.Method method)
        Always allows using the specified field in conjunction with a method.
        Specified by:
        canUse in interface FieldFilter
        Parameters:
        field - The field to check.
        method - The method to check. This parameter is not used in the current implementation.
        Returns:
        Always returns true.
      • canRead

        public boolean canRead​(java.lang.reflect.Field field)
        Always allows reading the specified field.
        Specified by:
        canRead in interface FieldFilter
        Parameters:
        field - The field to check.
        Returns:
        Always returns true.
      • canWrite

        public boolean canWrite​(java.lang.reflect.Field field)
        Always allows writing to the specified field.
        Specified by:
        canWrite in interface FieldFilter
        Parameters:
        field - The field to check.
        Returns:
        Always returns true.