Package net.minidev.asm
Class BasicFiledFilter
- java.lang.Object
-
- net.minidev.asm.BasicFiledFilter
-
- All Implemented Interfaces:
FieldFilter
public class BasicFiledFilter extends java.lang.Object implements FieldFilter
A basic implementation of theFieldFilterinterface that permits all operations on fields. This implementation returnstruefor 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 BasicFiledFilterSINGLETONA singleton instance ofBasicFieldFilter.
-
Constructor Summary
Constructors Constructor Description BasicFiledFilter()default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanRead(java.lang.reflect.Field field)Always allows reading the specified field.booleancanUse(java.lang.reflect.Field field)Always allows using the specified field.booleancanUse(java.lang.reflect.Field field, java.lang.reflect.Method method)Always allows using the specified field in conjunction with a method.booleancanWrite(java.lang.reflect.Field field)Always allows writing to the specified field.
-
-
-
Field Detail
-
SINGLETON
public static final BasicFiledFilter SINGLETON
A singleton instance ofBasicFieldFilter. Since the filter does not maintain any state and allows all operations, it can be reused across the application.
-
-
Method Detail
-
canUse
public boolean canUse(java.lang.reflect.Field field)
Always allows using the specified field.- Specified by:
canUsein interfaceFieldFilter- 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:
canUsein interfaceFieldFilter- 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:
canReadin interfaceFieldFilter- 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:
canWritein interfaceFieldFilter- Parameters:
field- The field to check.- Returns:
- Always returns
true.
-
-