net.jqwik.engine.facades.FunctionsFacadeImpl Maven / Gradle / Ivy
package net.jqwik.engine.facades;
import net.jqwik.api.*;
import net.jqwik.api.arbitraries.*;
import net.jqwik.engine.properties.arbitraries.*;
import static net.jqwik.engine.support.JqwikReflectionSupport.*;
/**
* Is loaded through reflection in api module
*/
public class FunctionsFacadeImpl extends Functions.FunctionsFacade {
@Override
public void ensureFunctionalType(Class> functionalType) {
if (!isFunctionalType(functionalType)) {
throw new NotAFunctionalTypeException(functionalType);
}
}
@SuppressWarnings("unchecked")
@Override
public FunctionArbitrary function(Class> functionalType, Arbitrary resultArbitrary) {
return (FunctionArbitrary) new DefaultFunctionArbitrary<>(functionalType, resultArbitrary);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy