Class BmReferenceMatch

  • All Implemented Interfaces:
    IMatchParentProvider

    public class BmReferenceMatch
    extends Match
    Minimal representation of finded reference between BM objects
    • Constructor Detail

      • BmReferenceMatch

        public BmReferenceMatch​(BmObjectMatch source,
                                org.eclipse.emf.ecore.EStructuralFeature feature)
        Create instance of BM based reference match
        Parameters:
        source - the matched object as source of reference, cannot be null
        feature - the reference from source object, cannot be null
      • BmReferenceMatch

        public BmReferenceMatch​(BmObjectMatch source,
                                org.eclipse.emf.ecore.EStructuralFeature feature,
                                BmObjectMatch target)
        Create instance of BM based reference match
        Parameters:
        source - the matched object as source of reference, cannot be null
        feature - the reference from source object, cannot be null
        target - the match object as target of reference, can be null
    • Method Detail

      • getSource

        public BmObjectMatch getSource()
        The source object of reference
        Returns:
        the matched object as source of reference, cannot be null
      • getTarget

        public Optional<BmObjectMatch> getTarget()
        The target object of reference
        Returns:
        the matched object as target of reference, or empty optional
      • getFeature

        public org.eclipse.emf.ecore.EStructuralFeature getFeature()
        The reference from source to target object
        Returns:
        the feature
      • getElement

        public Object getElement()
        Description copied from class: Match
        Returns the element that contains this match. The element is used to group the match.
        Specified by:
        getElement in class Match
        Returns:
        the element that contains this match, cannot be null
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Match