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
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description BuilderInfo
findBuilderInfo(TypeMirror type)
Find the builder information, if any, for thetype
.default void
init(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(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
type
if it exists, ornull
if 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
- iftype
has more than one method that can create the builder
-
-