Package org.mapstruct.ap.spi
Class FreeBuilderAccessorNamingStrategy
- java.lang.Object
-
- org.mapstruct.ap.spi.DefaultAccessorNamingStrategy
-
- org.mapstruct.ap.spi.FreeBuilderAccessorNamingStrategy
-
- All Implemented Interfaces:
AccessorNamingStrategy
@Experimental("The FreeBuilder accessor naming strategy might change in a subsequent release") public class FreeBuilderAccessorNamingStrategy extends DefaultAccessorNamingStrategy
Accessor naming strategy for FreeBuilder. FreeBuilder adds a lot of other methods that can be considered as fluent setters. Such as:from(Target)
mapXXX(UnaryOperator)
mutateXXX(Consumer)
mergeFrom(Target)
mergeFrom(Target.Builder)
When the JavaBean convention is not used with FreeBuilder then the getters are non-standard and MapStruct won't recognize them. Therefore, one needs to use the JavaBean convention in which the fluent setters start with
set
.- Author:
- Filip Hrisafov
-
-
Field Summary
-
Fields inherited from class org.mapstruct.ap.spi.DefaultAccessorNamingStrategy
elementUtils, typeUtils
-
-
Constructor Summary
Constructors Constructor Description FreeBuilderAccessorNamingStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
isFluentSetter(ExecutableElement method)
-
Methods inherited from class org.mapstruct.ap.spi.DefaultAccessorNamingStrategy
getCollectionGetterName, getElementName, getMethodType, getPropertyName, getQualifiedName, init, isAdderMethod, isGetterMethod, isPresenceCheckMethod, isSetterMethod
-
-
-
-
Method Detail
-
isFluentSetter
protected boolean isFluentSetter(ExecutableElement method)
- Overrides:
isFluentSetter
in classDefaultAccessorNamingStrategy
-
-