Package org.mapstruct.ap.internal.util
Class AccessorNamingUtils
- java.lang.Object
-
- org.mapstruct.ap.internal.util.AccessorNamingUtils
-
public final class AccessorNamingUtils extends java.lang.ObjectUtils for working with theAccessorNamingStrategy.
-
-
Field Summary
Fields Modifier and Type Field Description private AccessorNamingStrategyaccessorNamingStrategy
-
Constructor Summary
Constructors Constructor Description AccessorNamingUtils(AccessorNamingStrategy accessorNamingStrategy)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetElementNameForAdder(Accessor adderMethod)java.lang.StringgetPropertyName(javax.lang.model.element.ExecutableElement executable)private static java.lang.StringgetQualifiedName(javax.lang.model.type.TypeMirror type)booleanisAdderMethod(javax.lang.model.element.ExecutableElement executable)booleanisGetterMethod(javax.lang.model.element.ExecutableElement executable)booleanisPresenceCheckMethod(javax.lang.model.element.ExecutableElement executable)booleanisSetterMethod(javax.lang.model.element.ExecutableElement executable)
-
-
-
Field Detail
-
accessorNamingStrategy
private final AccessorNamingStrategy accessorNamingStrategy
-
-
Constructor Detail
-
AccessorNamingUtils
public AccessorNamingUtils(AccessorNamingStrategy accessorNamingStrategy)
-
-
Method Detail
-
isGetterMethod
public boolean isGetterMethod(javax.lang.model.element.ExecutableElement executable)
-
isPresenceCheckMethod
public boolean isPresenceCheckMethod(javax.lang.model.element.ExecutableElement executable)
-
isSetterMethod
public boolean isSetterMethod(javax.lang.model.element.ExecutableElement executable)
-
isAdderMethod
public boolean isAdderMethod(javax.lang.model.element.ExecutableElement executable)
-
getPropertyName
public java.lang.String getPropertyName(javax.lang.model.element.ExecutableElement executable)
-
getElementNameForAdder
public java.lang.String getElementNameForAdder(Accessor adderMethod)
- Parameters:
adderMethod- the adder method- Returns:
- the 'element name' to which an adder method applies. If. e.g. an adder method is named
addChild(Child v), the element name would be 'Child'.
-
getQualifiedName
private static java.lang.String getQualifiedName(javax.lang.model.type.TypeMirror type)
-
-