Package org.mapstruct.ap.spi
Interface BuilderProvider
-
- All Known Implementing Classes:
DefaultBuilderProvider,ImmutablesBuilderProvider,NoOpBuilderProvider
public interface BuilderProviderA 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
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description BuilderInfofindBuilderInfo(javax.lang.model.type.TypeMirror type)Find the builder information, if any, for thetype.default voidinit(MapStructProcessingEnvironment processingEnvironment)Initializes the builder provider with the MapStruct processing environment.
-
-
-
Method Detail
-
init
default void init(MapStructProcessingEnvironment processingEnvironment)
Initializes the builder provider with the MapStruct processing environment.- Parameters:
processingEnvironment- environment for facilities
-
findBuilderInfo
BuilderInfo findBuilderInfo(javax.lang.model.type.TypeMirror type)
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
-
-