All Downloads are FREE. Search and download functionalities are using the official Maven repository.

junitparams.converters.Converter Maven / Gradle / Ivy

There is a newer version: 1.1.1
Show newest version
package junitparams.converters;

import java.lang.annotation.Annotation;

/**
 * Defines the logic to convert parameter annotated with A to type T. Converter must have a public no-args constructor. Configuration is
 * done via {@link Converter#initialize(java.lang.annotation.Annotation)} method
* Inspired by javax.validation.ConstraintValidator * * @param type of annotation mentioning this converter * @param conversion target type */ public interface Converter { /** * Initializes this converter - you can read your annotation config here. */ void initialize(A annotation); /** * Converts param to desired type. * * @throws ConversionFailedException */ T convert(Object param) throws ConversionFailedException; }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy