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.
    Filip Hrisafov
    • Method Detail

      • init

        default void init​(MapStructProcessingEnvironment processingEnvironment)
        Initializes the builder provider with the MapStruct processing environment.
        processingEnvironment - environment for facilities
      • findBuilderInfo

        BuilderInfo findBuilderInfo​(TypeMirror type)
        Find the builder information, if any, for the type.
        type - the type for which a builder should be found
        the builder info for the type if it exists, or null if there is no builder
        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 round
        MoreThanOneBuilderCreationMethodException - if type has more than one method that can create the builder