Class FeaturePathDmrSegmentGenerator
- java.lang.Object
-
- org.eclipse.emfforms.internal.core.services.segments.featurepath.FeaturePathDmrSegmentGenerator
-
- All Implemented Interfaces:
DmrSegmentGenerator
public class FeaturePathDmrSegmentGenerator extends java.lang.Object implements DmrSegmentGenerator
- Author:
- Lucas Koehler
-
-
Field Summary
-
Fields inherited from interface org.eclipse.emfforms.spi.core.services.segments.DmrSegmentGenerator
NOT_APPLICABLE
-
-
Constructor Summary
Constructors Constructor Description FeaturePathDmrSegmentGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<VDomainModelReferenceSegment>
generateSegments(VDomainModelReference reference)
Takes aVDomainModelReference
and generates the list of equivalentDMR Segments
.double
isApplicable(VDomainModelReference reference)
Returns a double that expresses if and how suitable this tester is for the givenVDomainModelReference
.
-
-
-
Method Detail
-
isApplicable
public double isApplicable(VDomainModelReference reference)
Description copied from interface:DmrSegmentGenerator
Returns a double that expresses if and how suitable this tester is for the givenVDomainModelReference
.- Specified by:
isApplicable
in interfaceDmrSegmentGenerator
- Parameters:
reference
- TheVDomainModelReference
- Returns:
- The value indicating how suitable this tester is,
DmrSegmentGenerator.NOT_APPLICABLE
if it can't work with the givenVDomainModelReference
.
-
generateSegments
public java.util.List<VDomainModelReferenceSegment> generateSegments(VDomainModelReference reference)
Description copied from interface:DmrSegmentGenerator
Takes aVDomainModelReference
and generates the list of equivalentDMR Segments
. Equivalent means that a DMR using the generated segments resolves exactly the same as the given DMR.The segment generation is side-effect free. This means neither the given DMR nor any of its contained or referenced elements is changed.
- Specified by:
generateSegments
in interfaceDmrSegmentGenerator
- Parameters:
reference
- TheVDomainModelReference
to generate thesegments
for- Returns:
- The list of generated
segments
; might return an empty list if the given DMR does not specify any path but nevernull
-
-