Package org.jeasy.random.api
Interface ExclusionPolicy
-
- All Known Implementing Classes:
DefaultExclusionPolicy
public interface ExclusionPolicyStrategy interface for field/type exclusion.- Since:
- 4.0
- Author:
- Mahmoud Ben Hassine (mahmoud.benhassine@icloud.com)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanshouldBeExcluded(java.lang.Class<?> type, RandomizerContext context)Given the current randomization context, should the type be excluded from being randomized?booleanshouldBeExcluded(java.lang.reflect.Field field, RandomizerContext context)Given the current randomization context, should the field be excluded from being randomized?
-
-
-
Method Detail
-
shouldBeExcluded
boolean shouldBeExcluded(java.lang.reflect.Field field, RandomizerContext context)Given the current randomization context, should the field be excluded from being randomized?- Parameters:
field- the field to checkcontext- the current randomization context- Returns:
- true if the field should be excluded, false otherwise
-
shouldBeExcluded
boolean shouldBeExcluded(java.lang.Class<?> type, RandomizerContext context)Given the current randomization context, should the type be excluded from being randomized?- Parameters:
type- the type to checkcontext- the current randomization context- Returns:
- true if the type should be excluded, false otherwise
-
-