Class ParameterBinding
java.lang.Object
org.mapstruct.ap.internal.model.common.ParameterBinding
Represents how one parameter of a method to be called is populated.
- Author:
- Andreas Gudian
-
Method Summary
Modifier and TypeMethodDescriptionstatic ParameterBindingforMappingTargetBinding(Type resultType) static ParameterBindingforSourcePropertyNameBinding(Type classTypeOf) static ParameterBindingforSourceTypeBinding(Type sourceType) static ParameterBindingforTargetPropertyNameBinding(Type classTypeOf) static ParameterBindingforTargetTypeBinding(Type classTypeOf) static ParameterBindingfromParameter(Parameter parameter) static List<ParameterBinding> fromParameters(List<Parameter> parameters) static ParameterBindingfromSourceRHS(SourceRHS sourceRHS) static ParameterBindingfromTypeAndName(Type parameterType, String parameterName) getType()booleanbooleanbooleanbooleanbooleanbooleanboolean
-
Method Details
-
getVariableName
- Returns:
- the name of the variable (or parameter) that is being used as argument for the parameter being bound.
-
isSourceParameter
public boolean isSourceParameter() -
isTargetType
public boolean isTargetType()- Returns:
true, if the parameter being bound is a@TargetTypeparameter.
-
isMappingTarget
public boolean isMappingTarget()- Returns:
true, if the parameter being bound is a@MappingTargetparameter.
-
isMappingContext
public boolean isMappingContext()- Returns:
true, if the parameter being bound is a@MappingContextparameter.
-
isForSourceRhs
public boolean isForSourceRhs() -
isSourcePropertyName
public boolean isSourcePropertyName()- Returns:
true, if the parameter being bound is a@SourcePropertyNameparameter.
-
isTargetPropertyName
public boolean isTargetPropertyName()- Returns:
true, if the parameter being bound is a@TargetPropertyNameparameter.
-
getType
- Returns:
- the type of the parameter that is bound
-
getSourceRHS
- Returns:
- the sourceRHS that this parameter is bound to
-
getImportTypes
-
fromParameter
- Parameters:
parameter- parameter- Returns:
- a parameter binding reflecting the given parameter as being used as argument for a method call
-
fromParameters
-
fromTypeAndName
-
forTargetTypeBinding
- Parameters:
classTypeOf- the type representingClass<X>for the target typeX- Returns:
- a parameter binding representing a target type parameter
-
forTargetPropertyNameBinding
- Returns:
- a parameter binding representing a target property name parameter
-
forSourcePropertyNameBinding
- Returns:
- a parameter binding representing a source property name parameter
-
forMappingTargetBinding
- Parameters:
resultType- type of the mapping target- Returns:
- a parameter binding representing a mapping target parameter
-
forSourceTypeBinding
- Parameters:
sourceType- type of the parameter- Returns:
- a parameter binding representing a mapping source type
-
fromSourceRHS
-