public class BasicFiledFilter extends Object implements FieldFilter
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.Modifier and Type | Field and Description |
---|---|
static BasicFiledFilter |
SINGLETON
A singleton instance of
BasicFieldFilter . |
Constructor and Description |
---|
BasicFiledFilter()
default constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
canRead(Field field)
Always allows reading the specified field.
|
boolean |
canUse(Field field)
Always allows using the specified field.
|
boolean |
canUse(Field field,
Method method)
Always allows using the specified field in conjunction with a method.
|
boolean |
canWrite(Field field)
Always allows writing to the specified field.
|
public static final BasicFiledFilter SINGLETON
BasicFieldFilter
.
Since the filter does not maintain any state and allows all operations, it can be reused across the application.public boolean canUse(Field field)
canUse
in interface FieldFilter
field
- The field to check.true
.public boolean canUse(Field field, Method method)
canUse
in interface FieldFilter
field
- The field to check.method
- The method to check. This parameter is not used in the current implementation.true
.public boolean canRead(Field field)
canRead
in interface FieldFilter
field
- The field to check.true
.public boolean canWrite(Field field)
canWrite
in interface FieldFilter
field
- The field to check.true
.Copyright © 2025 Chemouni Uriel. All rights reserved.