Class BslReferenceMatch

  • All Implemented Interfaces:
    IMatchParentProvider

    public class BslReferenceMatch
    extends Match
    Minimal representation of finded reference between BSL module to BM objects
    • Constructor Detail

      • BslReferenceMatch

        public BslReferenceMatch​(IBmModel model,
                                 org.eclipse.xtext.resource.IReferenceDescription referenceDescription)
        Create instance of BSL module reference match
        Parameters:
        model - the BM model contain matched object, cannot be null
        referenceDescription - the source IReferenceDescription, cannot be null
      • BslReferenceMatch

        public BslReferenceMatch​(IBmModel model,
                                 org.eclipse.xtext.resource.IReferenceDescription referenceDescription,
                                 BmObjectMatch target)
        Create instance of BSL module reference match
        Parameters:
        model - the BM model contain matched object, cannot be null
        referenceDescription - the source IReferenceDescription, cannot be null
        target - the match object as target of BSL reference, can be null
    • Method Detail

      • getContainerURI

        public org.eclipse.emf.common.util.URI getContainerURI()
        Gets the BSL module URI
        Returns:
        the containerURI URI of BSL module with matched object, cannot be null
      • getSourceURI

        public org.eclipse.emf.common.util.URI getSourceURI()
        Gets reference URI to matched object
        Returns:
        the sourceUri URI to matched object, cannot be null
      • getIndexInList

        public int getIndexInList()
        Gets index of the reference in list of multiple refrence
        Returns:
        the index of the reference, if the reference isMultiple, -1 if it is a single value reference
      • getReference

        public org.eclipse.emf.ecore.EReference getReference()
        Gets EReference to matched object
        Returns:
        the reference to matched object, may be null
      • getTarget

        public Optional<BmObjectMatch> getTarget()
        The target object of reference
        Returns:
        the matched object as target of reference, or empty optional
      • 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