public class SourceMethod extends Object implements Method
 A method can either be configured by itself or by another method for the inverse mapping direction (the appropriate
 setter on MappingOptions will be called in this case).
| Modifier and Type | Class and Description | 
|---|---|
| static class  | SourceMethod.Builder | 
| Modifier and Type | Method and Description | 
|---|---|
| boolean | canInheritFrom(SourceMethod method) | 
| static boolean | containsTargetTypeParameter(List<Parameter> parameters) | 
| Accessibility | getAccessibility()Returns the  Accessibilityof this method. | 
| List<SourceMethod> | getApplicablePrototypeMethods() | 
| 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() | 
| MapperConfiguration | getMapperConfiguration() | 
| List<Mapping> | getMappingBySourcePropertyName(String sourcePropertyName)Returns the  Mappings for the given source property. | 
| MappingOptions | getMappingOptions() | 
| Parameter | getMappingTargetParameter()Returns the parameter designated as mapping target (if present)  MappingTarget | 
| String | getName()Returns then name of the method. | 
| List<String> | getParameterNames() | 
| List<Parameter> | getParameters()In contrast to  Method.getSourceParameters()this method returns all parameters | 
| Type | getResultType()Returns the type of the result. | 
| Type | getReturnType()Returns the return type of the method | 
| Mapping | getSingleMappingByTargetPropertyName(String targetPropertyName) | 
| Parameter | getSourceParameter(String sourceParameterName) | 
| List<Parameter> | getSourceParameters()returns the list of 'true' source parameters excluding the parameter(s) that is designated as
 target by means of the target annotation  Method.getMappingTargetParameter(). | 
| Parameter | getTargetTypeParameter()Returns the parameter designated as target type (if present)  TargetType | 
| List<Type> | getThrownTypes()Returns all exceptions thrown by this method | 
| boolean | isAfterMappingMethod() | 
| boolean | isBeforeMappingMethod() | 
| boolean | isDefault()Whether this method is Java 8 default method | 
| boolean | isEnumMapping() | 
| boolean | isIterableMapping() | 
| boolean | isLifecycleCallbackMethod() | 
| boolean | isMapMapping() | 
| boolean | isSame(SourceMethod method) | 
| 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 an implementation of this method must be generated or not. | 
| boolean | reverses(SourceMethod method) | 
| String | toString() | 
public Type getDeclaringMapper()
Mapper#users(). MethodgetDeclaringMapper in interface Methodpublic ExecutableElement getExecutable()
getExecutable in interface Methodpublic List<Parameter> getParameters()
Method.getSourceParameters() this method returns all parameters MethodgetParameters in interface Methodpublic List<Parameter> getSourceParameters()
Method.getMappingTargetParameter(). MethodgetSourceParameters in interface Methodpublic List<String> getParameterNames()
getParameterNames in interface Methodpublic Type getResultType()
MethodMappingTarget, or in absence the return type.getResultType in interface Methodpublic Type getReturnType()
MethodgetReturnType in interface Methodpublic Accessibility getAccessibility()
MethodAccessibility of this method.getAccessibility in interface MethodAccessibility of this methodpublic Mapping getSingleMappingByTargetPropertyName(String targetPropertyName)
public boolean reverses(SourceMethod method)
public boolean isSame(SourceMethod method)
public boolean canInheritFrom(SourceMethod method)
public Parameter getMappingTargetParameter()
MethodMappingTargetgetMappingTargetParameter in interface Methodpublic Parameter getTargetTypeParameter()
MethodTargetTypegetTargetTypeParameter in interface Methodpublic boolean isIterableMapping()
public boolean isMapMapping()
public boolean isEnumMapping()
public List<Mapping> getMappingBySourcePropertyName(String sourcePropertyName)
Mappings for the given source property.sourcePropertyName - the source property namepublic List<SourceMethod> getApplicablePrototypeMethods()
public boolean overridesMethod()
overridesMethod in interface Methodpublic boolean matches(List<Type> sourceTypes, Type targetType)
Methodpublic static boolean containsTargetTypeParameter(List<Parameter> parameters)
parameters - the parameter list to checktrue if the parameter list contains a parameter annotated with @TargetTypepublic List<Type> getThrownTypes()
MethodgetThrownTypes in interface Methodpublic MappingOptions getMappingOptions()
public boolean isStatic()
Methodpublic boolean isDefault()
Methodpublic Type getDefiningType()
getDefiningType in interface Methodpublic MapperConfiguration getMapperConfiguration()
getMapperConfiguration in interface Methodpublic boolean isLifecycleCallbackMethod()
isLifecycleCallbackMethod in interface Methodtrue, if the method represents a mapping lifecycle callback (Before/After mapping method)public boolean isAfterMappingMethod()
public boolean isBeforeMappingMethod()
public boolean isUpdateMethod()
isUpdateMethod in interface Methodtrue, if the method is an update method, i.e. it has a parameter annotated with
         @MappingTarget.Copyright © 2012-2015 Gunnar Morling; All rights reserved. Released under the Apache Software License 2.0.