Class Parameter

  • All Implemented Interfaces:
    Writable

    public class Parameter
    extends ModelElement
    A parameter of a mapping method.
    Author:
    Gunnar Morling
    • Constructor Detail

      • Parameter

        public Parameter​(String name,
                         Type type)
    • Method Detail

      • getElement

        public Element getElement()
      • getName

        public String getName()
      • getOriginalName

        public String getOriginalName()
      • getType

        public Type getType()
      • isMappingTarget

        public boolean isMappingTarget()
      • describe

        public String describe()
      • getImportTypes

        public Set<Type> getImportTypes()
        Description copied from class: ModelElement
        Returns a set containing those Types referenced by this model element for which an import statement needs to be declared.
        Specified by:
        getImportTypes in class ModelElement
        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()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • forForgedMappingTarget

        public static Parameter forForgedMappingTarget​(Type parameterType)
      • getSourceParameters

        public static List<Parameter> getSourceParameters​(List<Parameter> parameters)
        Parameters:
        parameters - the parameters to filter
        Returns:
        the parameters from the given list that are considered 'source parameters'
      • getSourceParameter

        public static Parameter getSourceParameter​(List<Parameter> parameters,
                                                   String sourceParameterName)
        Parameters:
        parameters - the parameters to scan
        sourceParameterName - the source parameter name to match
        Returns:
        the parameters from the given list that are considered 'source parameters'
      • getContextParameters

        public static List<Parameter> getContextParameters​(List<Parameter> parameters)
        Parameters:
        parameters - the parameters to filter
        Returns:
        the parameters from the given list that are marked as 'mapping context parameters'
      • getMappingTargetParameter

        public static Parameter getMappingTargetParameter​(List<Parameter> parameters)
      • getSourcePropertyNameParameter

        public static Parameter getSourcePropertyNameParameter​(List<Parameter> parameters)
      • getTargetPropertyNameParameter

        public static Parameter getTargetPropertyNameParameter​(List<Parameter> parameters)