Package org.mapstruct.ap.spi
Interface BuilderProvider
- All Known Implementing Classes:
DefaultBuilderProvider,ImmutablesBuilderProvider,NoOpBuilderProvider
public interface BuilderProvider
A service provider interface that is used to detect types that require a builder for mapping. This interface could
support automatic detection of builders for projects like Lombok, Immutables, AutoValue, etc.
- Since:
- 1.3
- Author:
- Filip Hrisafov
-
Method Summary
Modifier and TypeMethodDescriptionfindBuilderInfo(TypeMirror type) Find the builder information, if any, for thetype.default voidinit(MapStructProcessingEnvironment processingEnvironment) Initializes the builder provider with the MapStruct processing environment.
-
Method Details
-
init
Initializes the builder provider with the MapStruct processing environment.- Parameters:
processingEnvironment- environment for facilities
-
findBuilderInfo
Find the builder information, if any, for thetype.- Parameters:
type- the type for which a builder should be found- Returns:
- the builder info for the
typeif it exists, ornullif there is no builder - Throws:
TypeHierarchyErroneousException- if the type that needs to be visited is not ready yet, this signals the MapStruct processor to postpone the generation of the mappers to the next roundMoreThanOneBuilderCreationMethodException- iftypehas more than one method that can create the builder
-