Class SegmentResolvementUtil


  • public final class SegmentResolvementUtil
    extends java.lang.Object
    This utility class provides methods to resolve VDomainModelReferenceSegments against an EClass.
    Since:
    1.20
    Author:
    Lucas Koehler
    • Method Detail

      • resolveSegments

        public static void resolveSegments​(java.util.List<VDomainModelReferenceSegment> segments,
                                           org.eclipse.emf.ecore.EClass rootEClass,
                                           java.util.function.Consumer<org.eclipse.emf.ecore.EStructuralFeature> callback)
        Resolves a path of VDomainModelReferenceSegments starting at the given EClass. For every EStructuralFeature which was resolved, the callback is called.
        Parameters:
        segments - The path to resolve
        rootEClass - The root EClass of the path
        callback - The callback to handle the resolved EStructuralFeatures
      • resolveSegmentsToFeatureList

        public static java.util.List<org.eclipse.emf.ecore.EStructuralFeature> resolveSegmentsToFeatureList​(java.util.List<VDomainModelReferenceSegment> segments,
                                                                                                            org.eclipse.emf.ecore.EClass rootEClass)
        Resolves a path of VDomainModelReferenceSegments starting at the given EClass. Returns a list of all resolved EStructuralFeatures with the same order as the given list of segments.
        Parameters:
        segments - The path to resolve
        rootEClass - The root EClass of the path
        Returns:
        The resolved EStructuralFeatures