Class ParameterBinding


  • public class ParameterBinding
    extends Object
    Represents how one parameter of a method to be called is populated.
    Author:
    Andreas Gudian
    • Method Detail

      • getVariableName

        public 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 @TargetType parameter.
      • isMappingTarget

        public boolean isMappingTarget()
        Returns:
        true, if the parameter being bound is a @MappingTarget parameter.
      • isMappingContext

        public boolean isMappingContext()
        Returns:
        true, if the parameter being bound is a @MappingContext parameter.
      • 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 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
      • forTargetTypeBinding

        public static ParameterBinding forTargetTypeBinding​(Type classTypeOf)
        Parameters:
        classTypeOf - the type representing Class<X> for the target type X
        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