Class AbstractUObjectConverterForDynamicTypes

    • Field Detail

      • converter

        @Inject
        protected org.eclipse.xtext.naming.IQualifiedNameConverter converter
    • Constructor Detail

      • AbstractUObjectConverterForDynamicTypes

        public AbstractUObjectConverterForDynamicTypes()
    • Method Detail

      • isAppropriate

        public boolean isAppropriate​(String typeName,
                                     Version version)
        Description copied from interface: IUObjectConverter
        Checks that this converter can convert TypeItem with name typeName
        Specified by:
        isAppropriate in interface IUObjectConverter
        Overrides:
        isAppropriate in class AbstractUObjectConverter
        Parameters:
        typeName - name of candidate TypeItem for converting to universal type, can't be null
        version - actual runtime version, can't be null
        Returns:
        true if type corresponding to typeName can be converted to universal type by this converter, false otherwise
      • convert

        public TypeItem convert​(TypeItem type,
                                Version version,
                                Map<String,​TypeItem> earlierComputedUTypes,
                                org.eclipse.emf.ecore.resource.Resource resource)
        Description copied from interface: IUObjectConverter
        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 - (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
      • getNameBaseUType

        protected abstract String getNameBaseUType()
        Gets name of base universal type
        Returns:
        name of universal type, can't be null
      • getNameBaseUTypeRu

        protected abstract String getNameBaseUTypeRu()
        Gets Russian name of base universal type
        Returns:
        name of universal type, can't be null
      • filteringPropertiesByVisibility

        protected abstract void filteringPropertiesByVisibility​(TypeItem baseType,
                                                                Type uType,
                                                                org.eclipse.emf.ecore.resource.Resource resource)
        Filter properties of converting type
        Parameters:
        baseType - converting type, can't be null
        resource - actual Resource for resolving, can't be null
        uType - created converting type, can't be null
      • addMethodsFromUniversalType

        protected void addMethodsFromUniversalType​(Type baseUType,
                                                   Type uType)
        Add method to created type from universal base type
        Parameters:
        baseUType - base universal type, can't be null
        uType - created converting type, can't be null