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 Details

    • SubclassMapping

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

    • 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.
    • getAssignment

      public AssignmentWrapper getAssignment()
    • getSourceArgument

      public String getSourceArgument()
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object