Class SubclassMapping

  • All Implemented Interfaces:
    Writable

    public class SubclassMapping
    extends ModelElement
    Represents the mapping between a Subclass and its mapping target. This will be used by a BeanMappingMethod that has SubclassMapping annotations applied to it. Before doing the normal mapping for that method it will first check if the source object is of the sourceType if so it will use the assignment instead.
    Author:
    Ben Zegveld
    • Constructor Detail

      • SubclassMapping

        public SubclassMapping​(Type sourceType,
                               String sourceArgument,
                               Type targetType,
                               Assignment assignment)
    • Method Detail

      • getSourceType

        public Type getSourceType()
      • 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.
      • getSourceArgument

        public String getSourceArgument()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object