Package io.github.krandom
Class DefaultExclusionPolicy
-
- All Implemented Interfaces:
-
io.github.krandom.api.ExclusionPolicy
public class DefaultExclusionPolicy implements ExclusionPolicy
Component that encapsulates the logic of field/type exclusion in a given randomization context. This class implements exclusion rules in the predefined order.
Mahmoud Ben Hassine ([email protected])
-
-
Constructor Summary
Constructors Constructor Description DefaultExclusionPolicy()
-
Method Summary
Modifier and Type Method Description boolean
shouldBeExcluded(@NotNull() Field field, @NotNull() RandomizerContext context)
Given the current randomization context, should the field be excluded from being populated ? boolean
shouldBeExcluded(@NotNull() Class<out Object> type, RandomizerContext context)
Given the current randomization context, should the type be excluded from being populated ? -
-
Method Detail
-
shouldBeExcluded
boolean shouldBeExcluded(@NotNull() Field field, @NotNull() RandomizerContext context)
Given the current randomization context, should the field be excluded from being populated ?
- Parameters:
field
- the field to checkcontext
- the current randomization context- Returns:
true if the field should be excluded, false otherwise
-
shouldBeExcluded
boolean shouldBeExcluded(@NotNull() Class<out Object> type, RandomizerContext context)
Given the current randomization context, should the type be excluded from being populated ?
- Parameters:
type
- the type to checkcontext
- the current randomization context- Returns:
true if the type should be excluded, false otherwise
-
-
-
-