Interface IJvmModelAssociator

  • All Known Implementing Classes:
    JvmModelAssociator

    public interface IJvmModelAssociator
    Used by clients to establish associations between source elements and inferred JVM elements.
    Since:
    2.7
    See Also:
    IJvmModelAssociations
    Noimplement:
    This interface is not intended to be implemented by clients.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void associate​(org.eclipse.emf.ecore.EObject sourceElement, org.eclipse.emf.ecore.EObject jvmElement)
      Associated the given source element with the given jvmElement.
      void associateLogicalContainer​(XExpression expression, org.eclipse.xtext.common.types.JvmIdentifiableElement logicalContainer)
      Sets the given JvmIdentifiableElement as the logical container of the given XExpression.
      void associatePrimary​(org.eclipse.emf.ecore.EObject sourceElement, org.eclipse.emf.ecore.EObject jvmElement)
      Associated the given source element with the given jvmElement and marks the association as primary on both sides.
      void removeAllAssociation​(org.eclipse.emf.ecore.EObject jvmElement)
      Removes all associations for the given jvm element.
      void removeAssociation​(org.eclipse.emf.ecore.EObject sourceElement, org.eclipse.emf.ecore.EObject jvmElement)
      Removes an association between the given source and jvm elements.
      void removeLogicalChildAssociation​(org.eclipse.xtext.common.types.JvmIdentifiableElement logicalContainer)
      Removes the logically contained child of the given identifiable.
    • Method Detail

      • associate

        void associate​(org.eclipse.emf.ecore.EObject sourceElement,
                       org.eclipse.emf.ecore.EObject jvmElement)
        Associated the given source element with the given jvmElement.
        Parameters:
        sourceElement - the source EObject
        jvmElement - the inferred EObject
      • associatePrimary

        void associatePrimary​(org.eclipse.emf.ecore.EObject sourceElement,
                              org.eclipse.emf.ecore.EObject jvmElement)
        Associated the given source element with the given jvmElement and marks the association as primary on both sides.
        Parameters:
        sourceElement - the source EObject
        jvmElement - the inferred EObject
      • associateLogicalContainer

        void associateLogicalContainer​(XExpression expression,
                                       org.eclipse.xtext.common.types.JvmIdentifiableElement logicalContainer)
        Sets the given JvmIdentifiableElement as the logical container of the given XExpression. The container must be an instanceof JvmExecutable or JvmField. The logical container is used to scope and link the given expression. Associating the logical container of an expression, automatically removes any previously logical containers for the given expression.
        Parameters:
        expression - the expression that is put into a scope
        logicalContainer - a method, constructor or field that should act as the logical container of the given expression
      • removeLogicalChildAssociation

        void removeLogicalChildAssociation​(org.eclipse.xtext.common.types.JvmIdentifiableElement logicalContainer)
        Removes the logically contained child of the given identifiable.
      • removeAssociation

        void removeAssociation​(org.eclipse.emf.ecore.EObject sourceElement,
                               org.eclipse.emf.ecore.EObject jvmElement)
        Removes an association between the given source and jvm elements.
        Throws:
        java.lang.IllegalArgumentException - if the given source element is null; if the given jvm element is null or dangling; if elements does not belong to the same resource
      • removeAllAssociation

        void removeAllAssociation​(org.eclipse.emf.ecore.EObject jvmElement)
        Removes all associations for the given jvm element.
        Throws:
        java.lang.IllegalArgumentException - if the give jvm element is null or dangling