Interface IUObjectConverterServiceProvider


  • public interface IUObjectConverterServiceProvider
    Interface for convert TypeItem to universal type. Implementation of this interface collects all of IUObjectConverter from extension point "uObjectconverterProvider"
    • Method Detail

      • hasConverter

        boolean hasConverter​(TypeItem type,
                             Version version)
        Checks that type has converter to universal type
        Parameters:
        type - checking TypeItem, can't be null
        version - actual configuration version for converting type. Can't be null
        Returns:
        true if converter was found, false otherwise
      • convert

        TypeItem convert​(TypeItem type,
                         Version version,
                         org.eclipse.emf.ecore.resource.Resource resource)
        Converts TypeItem to universal type
        Parameters:
        type - converting TypeItem, can't be null
        version - actual configuration version for converting type. Can't be null
        resource - actual Resource for resolving, can't be null
        Returns:
        universal type corresponding to type. Never null
        Throws:
        IllegalArgumentException - if converter wasn't found for this type and version
      • convert

        TypeItem convert​(TypeItem type,
                         Version version,
                         Map<String,​TypeItem> earlierComputedUTypes,
                         org.eclipse.emf.ecore.resource.Resource resource)
        Converts TypeItem to universal type
        Parameters:
        type - converting TypeItem, can't be null
        version - actual configuration version for converting type. Can't be null
        earlierComputedUTypes - map - contains universal types were computed earlier. (type name; its universal type), can be null if universal types weren't computed earlier
        resource - actual Resource for resolving, can't be null
        Returns:
        universal type corresponding to type. Never null
        Throws:
        IllegalArgumentException - if converter wasn't found for this type and version