--- title: API order: 5 category: - Guide description: Mapstruct MapStructPlus Converter Converter接口API converter api --- ## Converter The previous sections, which were all about configuring transformation logic on entity classes, were mainly applied at the compile stage. In practice, the framework provides the `Converter` class to perform the concreate transformation logic. This class provides the following methods for type conversion: - **` T convert(S source, Class targetType)`** Passes in the object and the target type to be converted, and finally returns an intance object of the target type. - **` T convert(S source, T target)`** Passes in the `source` object and `target` object, finally returns target object, and eventually converting the properties in the `source` object to the `target` object. This method differs from the above in that it returns an incoming `taring` object, whereas the above method return a new object. - **` List convert(List source, Class targetType)`** This method converts a collection of source types(`source`) to a collection of target types(`targetType`) - **` T convert(Map map, Class target)`** This method converts a `Map` to an instance object of the target type.