
public interface Method
BuiltInMethod and SourceMethod| Modifier and Type | Method and Description |
|---|---|
String |
describe() |
Accessibility |
getAccessibility()
Returns the
Accessibility of this method. |
List<Parameter> |
getContextParameters()
returns the list of mapping context parameters, i.e. those parameters that are annotated with
Context. |
ParameterProvidedMethods |
getContextProvidedMethods() |
Type |
getDeclaringMapper()
Returns the mapper type declaring this method if it is not declared by the mapper interface currently processed
but by another mapper imported via
Mapper#users(). |
Type |
getDefiningType() |
ExecutableElement |
getExecutable() |
default Type |
getMappingSourceType() |
Parameter |
getMappingTargetParameter()
Returns the parameter designated as mapping target (if present)
MappingTarget |
String |
getName()
Returns then name of the method.
|
MappingMethodOptions |
getOptions() |
List<String> |
getParameterNames() |
List<Parameter> |
getParameters()
In contrast to
getSourceParameters() this method returns all parameters |
Type |
getResultType()
Returns the type of the result.
|
Type |
getReturnType()
Returns the return type of the method
|
List<Parameter> |
getSourceParameters()
returns the list of 'true' source parameters excluding the parameter(s) that are designated as target, target
type or context parameter.
|
Parameter |
getTargetTypeParameter()
Returns the parameter designated as target type (if present)
TargetType |
List<Type> |
getThrownTypes()
Returns all exceptions thrown by this method
|
boolean |
isDefault()
Whether this method is Java 8 default method
|
boolean |
isLifecycleCallbackMethod() |
default boolean |
isMappingTargetAssignableToReturnType() |
boolean |
isObjectFactory()
Returns whether the meethod is designated as bean factory for
mapping target
ObjectFactory |
boolean |
isStatic()
Whether this method is static or an instance method
|
boolean |
isUpdateMethod() |
boolean |
matches(List<Type> sourceTypes,
Type targetType)
Checks whether the provided sourceType and provided targetType match with the parameter respectively return type
of the method.
|
boolean |
overridesMethod()
Whether this method overrides an abstract method.
|
boolean matches(List<Type> sourceTypes, Type targetType)
sourceTypes - the sourceTypes to match to the parametertargetType - the targetType to match to the returnTypeType getDeclaringMapper()
Mapper#users().String getName()
List<Parameter> getParameters()
getSourceParameters() this method returns all parametersList<Parameter> getSourceParameters()
List<Parameter> getContextParameters()
Context.ParameterProvidedMethods getContextProvidedMethods()
getContextParameters() to factory and lifecycle methods provided by them.Parameter getMappingTargetParameter()
MappingTargetboolean isObjectFactory()
ObjectFactoryParameter getTargetTypeParameter()
TargetTypeAccessibility getAccessibility()
Accessibility of this method.Accessibility of this methodType getReturnType()
List<Type> getThrownTypes()
Type getResultType()
MappingTarget, or in absence the return type.List<String> getParameterNames()
boolean overridesMethod()
ExecutableElement getExecutable()
boolean isStatic()
boolean isDefault()
Type getDefiningType()
boolean isLifecycleCallbackMethod()
true, if the method represents a mapping lifecycle callback (Before/After mapping method)boolean isUpdateMethod()
true, if the method is an update method, i.e. it has a parameter annotated with
@MappingTarget.MappingMethodOptions getOptions()
default boolean isMappingTargetAssignableToReturnType()
default Type getMappingSourceType()
String describe()
Copyright © 2012-2021 MapStruct Authors; All rights reserved. Released under the Apache Software License 2.0.