autofixture.generators.objects.implementationdetails.VisibilityCondition Maven / Gradle / Ivy
package autofixture.generators.objects.implementationdetails;
import java.util.function.Function;
public class VisibilityCondition implements ConstructorVisibility {
private final Function, Boolean> condition;
public VisibilityCondition(final Function, Boolean> visibilityCondition) {
condition = visibilityCondition;
}
@Override
public boolean appliesTo(InstanceCreation constructor) {
return condition.apply(constructor);
}
}