Class FunctionalModelExtensionProvider


  • public class FunctionalModelExtensionProvider
    extends Object
    Provides funtional extensions for EObject-based models via model operation custom implementations. Extensions may be registered via the registerExtension(Object, Class) method. Registered extensions available right after registration. It's up to a client to manage the lifecycle of extension registration and usage
    • Constructor Detail

      • FunctionalModelExtensionProvider

        public FunctionalModelExtensionProvider()
    • Method Detail

      • getInstance

        public static FunctionalModelExtensionProvider getInstance()
        Gets the only instance of this provider
        Returns:
        The only instance of the provider. May not be null
      • getExtension

        public <T> T getExtension​(Class<T> extensionType)
        Gets required extension
        Type Parameters:
        T - A target extension type
        Parameters:
        extensionType - A target extension class. May not be null
        Returns:
        A previously registered extension if any. null otherwise
      • registerExtension

        public <T> void registerExtension​(T extension,
                                          Class<T> extensionType)
        Registers a new extension
        Type Parameters:
        T - A target extension type
        Parameters:
        extension - An extension to register. May not be null
        extensionType - A type of an extension. May not be null