Class BmReferenceMatch

java.lang.Object
com._1c.g5.v8.dt.search.core.Match
com._1c.g5.v8.dt.search.core.refs.BmReferenceMatch
All Implemented Interfaces:
IMatchParentProvider

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

    • 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 Details

    • 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
    • getModel

      public IBmModel getModel()
      Description copied from interface: IMatchParentProvider
      Get parent BM model
      Specified by:
      getModel in interface IMatchParentProvider
      Overrides:
      getModel in class Match
      Returns:
      the BM model contain matched object, never null
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Match
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Match