Interface EStructuralFeatureValueConverter

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static double NOT_APPLICABLE
      Constant value to mark a converter implementation not applicable for the given EObject/EStructuralFeature combination.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.Object convertToLiteral​(org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.Object instance)
      Convert model value instance to string literal.
      java.lang.Object convertToModelValue​(org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.String literal)
      Convert string literal to model value instance.
      double isApplicable​(org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.Object value, EStructuralFeatureValueConverter.Direction direction)
      Check whether this converter instance is applicable for the given feature.
    • Field Detail

      • NOT_APPLICABLE

        static final double NOT_APPLICABLE
        Constant value to mark a converter implementation not applicable for the given EObject/EStructuralFeature combination.
        See Also:
        Constant Field Values
    • Method Detail

      • isApplicable

        double isApplicable​(org.eclipse.emf.ecore.EObject eObject,
                            org.eclipse.emf.ecore.EStructuralFeature feature,
                            java.lang.Object value,
                            EStructuralFeatureValueConverter.Direction direction)
        Check whether this converter instance is applicable for the given feature.
        Parameters:
        eObject - (optional)
        feature - the target feature
        value - the value
        direction - the direction
        Returns:
        rank of converter (higher value means higher priority)
      • convertToModelValue

        java.lang.Object convertToModelValue​(org.eclipse.emf.ecore.EObject eObject,
                                             org.eclipse.emf.ecore.EStructuralFeature feature,
                                             java.lang.String literal)
        Convert string literal to model value instance.
        Parameters:
        eObject - (optional, only required for EReferences)
        feature - the target feature
        literal - the string literal
        Returns:
        converted value
      • convertToLiteral

        java.lang.Object convertToLiteral​(org.eclipse.emf.ecore.EObject eObject,
                                          org.eclipse.emf.ecore.EStructuralFeature feature,
                                          java.lang.Object instance)
        Convert model value instance to string literal.
        Parameters:
        eObject - (optional)
        feature - the source feature
        instance - the source value object
        Returns:
        converted value (commonly a string literal)