Class MdExtensionTypeUtil

    • Method Detail

      • isTypeExtensionFeature

        public static boolean isTypeExtensionFeature​(org.eclipse.emf.ecore.EStructuralFeature feature)
        Check given feature is can contain TypeDescriptionExtension object
        Parameters:
        feature - to check, can be null
        Returns:
        true if given feature is can contain TypeDescriptionExtension object
      • isTypeDescriptionFeature

        public static boolean isTypeDescriptionFeature​(org.eclipse.emf.ecore.EStructuralFeature feature)
        Check given feature is can contain TypeDescription which can be replaced by TypeDescriptionExtension object
        Parameters:
        feature - to check, can be null
        Returns:
        true if given feature is can contain TypeDescription which can be replaced by TypeDescriptionExtension object
      • newTypeDescriptionExtension

        public static TypeDescriptionExtension newTypeDescriptionExtension()
        Returns a new type description extension
        Returns:
        a new type description extension, never null
      • newTypeDescriptionExtension

        public static TypeDescriptionExtension newTypeDescriptionExtension​(TypeExtension typeExtension)
        Returns a new type description extension containing the given type extension
        Parameters:
        typeExtension - type to be added to the type decription extension, can be null. In that case empty type description is created.
        Returns:
        a new type description extension containing the given type, never null
      • newTypeExtension

        public static TypeExtension newTypeExtension​(TypeItem typeItem,
                                                     MdPropertyState newPropertyState)
        Returns a new type extension containing the reference to given type and sets given property state
        Parameters:
        typeItem - of new type extension, cannot be null
        newPropertyState - state of type in new type extension, if null then MdPropertyState.NONE value will be setted
        Returns:
        a new type extension containing the reference to given type and sets given property state, never null