Class Parameter
java.lang.Object
org.mapstruct.ap.internal.writer.FreeMarkerWritable
org.mapstruct.ap.internal.model.common.ModelElement
org.mapstruct.ap.internal.model.common.Parameter
- All Implemented Interfaces:
Writable
A parameter of a mapping method.
- Author:
- Gunnar Morling
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.mapstruct.ap.internal.writer.Writable
Writable.Context -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondescribe()booleanstatic ParameterforElementAndType(VariableElement element, Type parameterType, boolean isVarArgs) static ParameterforForgedMappingTarget(Type parameterType) getContextParameters(List<Parameter> parameters) Returns a set containing thoseTypes referenced by this model element for which an import statement needs to be declared.static ParametergetMappingTargetParameter(List<Parameter> parameters) getName()static ParametergetSourceParameter(List<Parameter> parameters, String sourceParameterName) getSourceParameters(List<Parameter> parameters) static ParametergetSourcePropertyNameParameter(List<Parameter> parameters) static ParametergetTargetPropertyNameParameter(List<Parameter> parameters) static ParametergetTargetTypeParameter(List<Parameter> parameters) getType()inthashCode()booleanbooleanbooleanbooleanbooleanbooleanbooleantoString()Methods inherited from class org.mapstruct.ap.internal.writer.FreeMarkerWritable
getTemplateName, getTemplateNameForClass, write
-
Constructor Details
-
Parameter
-
Parameter
-
-
Method Details
-
getElement
-
getName
-
getOriginalName
-
getType
-
isMappingTarget
public boolean isMappingTarget() -
toString
-
describe
-
getImportTypes
Description copied from class:ModelElementReturns a set containing thoseTypes referenced by this model element for which an import statement needs to be declared.- Specified by:
getImportTypesin classModelElement- Returns:
- A set with type referenced by this model element. Must not be
null.
-
isTargetType
public boolean isTargetType() -
isMappingContext
public boolean isMappingContext() -
isTargetPropertyName
public boolean isTargetPropertyName() -
isSourcePropertyName
public boolean isSourcePropertyName() -
isVarArgs
public boolean isVarArgs() -
isSourceParameter
public boolean isSourceParameter() -
withName
-
hashCode
public int hashCode() -
equals
-
forElementAndType
public static Parameter forElementAndType(VariableElement element, Type parameterType, boolean isVarArgs) -
forForgedMappingTarget
-
getSourceParameters
- Parameters:
parameters- the parameters to filter- Returns:
- the parameters from the given list that are considered 'source parameters'
-
getSourceParameter
- Parameters:
parameters- the parameters to scansourceParameterName- the source parameter name to match- Returns:
- the parameters from the given list that are considered 'source parameters'
-
getContextParameters
- Parameters:
parameters- the parameters to filter- Returns:
- the parameters from the given list that are marked as 'mapping context parameters'
-
getMappingTargetParameter
-
getTargetTypeParameter
-
getSourcePropertyNameParameter
-
getTargetPropertyNameParameter
-