Class ParameterBinding
- java.lang.Object
-
- org.mapstruct.ap.internal.model.common.ParameterBinding
-
public class ParameterBinding extends java.lang.ObjectRepresents how one parameter of a method to be called is populated.
-
-
Field Summary
Fields Modifier and Type Field Description private booleanmappingContextprivate booleanmappingTargetprivate SourceRHSsourceRHSprivate booleantargetTypeprivate Typetypeprivate java.lang.StringvariableName
-
Constructor Summary
Constructors Modifier Constructor Description privateParameterBinding(Type parameterType, java.lang.String variableName, boolean mappingTarget, boolean targetType, boolean mappingContext, SourceRHS sourceRHS)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ParameterBindingforMappingTargetBinding(Type resultType)static ParameterBindingforSourceTypeBinding(Type sourceType)static ParameterBindingforTargetTypeBinding(Type classTypeOf)static ParameterBindingfromParameter(Parameter parameter)static java.util.List<ParameterBinding>fromParameters(java.util.List<Parameter> parameters)static ParameterBindingfromSourceRHS(SourceRHS sourceRHS)static ParameterBindingfromTypeAndName(Type parameterType, java.lang.String parameterName)java.util.Set<Type>getImportTypes()SourceRHSgetSourceRHS()TypegetType()java.lang.StringgetVariableName()booleanisMappingContext()booleanisMappingTarget()booleanisTargetType()
-
-
-
Method Detail
-
getVariableName
public java.lang.String getVariableName()
- Returns:
- the name of the variable (or parameter) that is being used as argument for the parameter being bound.
-
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.
-
getType
public Type getType()
- Returns:
- the type of the parameter that is bound
-
getSourceRHS
public SourceRHS getSourceRHS()
- Returns:
- the sourceRHS that this parameter is bound to
-
getImportTypes
public java.util.Set<Type> getImportTypes()
-
fromParameter
public static ParameterBinding fromParameter(Parameter parameter)
- Parameters:
parameter- parameter- Returns:
- a parameter binding reflecting the given parameter as being used as argument for a method call
-
fromParameters
public static java.util.List<ParameterBinding> fromParameters(java.util.List<Parameter> parameters)
-
fromTypeAndName
public static ParameterBinding fromTypeAndName(Type parameterType, java.lang.String parameterName)
-
forTargetTypeBinding
public static ParameterBinding forTargetTypeBinding(Type classTypeOf)
- Parameters:
classTypeOf- the type representingClass<X>for the target typeX- Returns:
- a parameter binding representing a target type parameter
-
forMappingTargetBinding
public static ParameterBinding forMappingTargetBinding(Type resultType)
- Parameters:
resultType- type of the mapping target- Returns:
- a parameter binding representing a mapping target parameter
-
forSourceTypeBinding
public static ParameterBinding forSourceTypeBinding(Type sourceType)
- Parameters:
sourceType- type of the parameter- Returns:
- a parameter binding representing a mapping source type
-
fromSourceRHS
public static ParameterBinding fromSourceRHS(SourceRHS sourceRHS)
-
-