Class ProtobufAccessorNamingStrategy
java.lang.Object
org.mapstruct.ap.spi.DefaultAccessorNamingStrategy
de.firehead.mapstruct.spi.protobuf.accessors.ProtobufAccessorNamingStrategy
- All Implemented Interfaces:
org.mapstruct.ap.spi.AccessorNamingStrategy
public class ProtobufAccessorNamingStrategy
extends org.mapstruct.ap.spi.DefaultAccessorNamingStrategy
Accessor naming strategy that is aware of the special naming conventions used in protobuf-generated classes.
Optionally supports Immutables as counterpart, much like
ImmutablesAccessorNamingStrategy, but doesn't require them.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanWhether Immutables is found on the classpath.protected TypeMirrorAn expected interface used to find out if a type is a protobuf message type (or a builder of one).Fields inherited from class org.mapstruct.ap.spi.DefaultAccessorNamingStrategy
elementUtils, typeUtils -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetElementName(ExecutableElement aMethod) getPropertyName(ExecutableElement aMethod) voidinit(org.mapstruct.ap.spi.MapStructProcessingEnvironment aProcessingEnvironment) booleanisAdderMethod(ExecutableElement aMethod) protected booleanisFluentSetter(ExecutableElement aMethod) booleanisGetterMethod(ExecutableElement aMethod) booleanisPresenceCheckMethod(ExecutableElement aMethod) booleanisSetterMethod(ExecutableElement aMethod) Methods inherited from class org.mapstruct.ap.spi.DefaultAccessorNamingStrategy
getCollectionGetterName, getMethodType, getQualifiedName
-
Field Details
-
protobufMarkerInterface
An expected interface used to find out if a type is a protobuf message type (or a builder of one). -
isImmutables
protected boolean isImmutablesWhether Immutables is found on the classpath. If true, we assume that the counterpart for protobuf mapping are Immutables-based data structures.
-
-
Constructor Details
-
ProtobufAccessorNamingStrategy
public ProtobufAccessorNamingStrategy()
-
-
Method Details
-
init
public void init(org.mapstruct.ap.spi.MapStructProcessingEnvironment aProcessingEnvironment) - Specified by:
initin interfaceorg.mapstruct.ap.spi.AccessorNamingStrategy- Overrides:
initin classorg.mapstruct.ap.spi.DefaultAccessorNamingStrategy
-
isGetterMethod
- Overrides:
isGetterMethodin classorg.mapstruct.ap.spi.DefaultAccessorNamingStrategy
-
isSetterMethod
- Overrides:
isSetterMethodin classorg.mapstruct.ap.spi.DefaultAccessorNamingStrategy
-
isFluentSetter
- Overrides:
isFluentSetterin classorg.mapstruct.ap.spi.DefaultAccessorNamingStrategy
-
isAdderMethod
- Overrides:
isAdderMethodin classorg.mapstruct.ap.spi.DefaultAccessorNamingStrategy
-
isPresenceCheckMethod
- Overrides:
isPresenceCheckMethodin classorg.mapstruct.ap.spi.DefaultAccessorNamingStrategy
-
getElementName
- Specified by:
getElementNamein interfaceorg.mapstruct.ap.spi.AccessorNamingStrategy- Overrides:
getElementNamein classorg.mapstruct.ap.spi.DefaultAccessorNamingStrategy
-
getPropertyName
- Specified by:
getPropertyNamein interfaceorg.mapstruct.ap.spi.AccessorNamingStrategy- Overrides:
getPropertyNamein classorg.mapstruct.ap.spi.DefaultAccessorNamingStrategy
-