Package com._1c.g5.v8.bm.integration
Class FunctionalModelExtensionProvider
- java.lang.Object
-
- com._1c.g5.v8.bm.integration.FunctionalModelExtensionProvider
-
public class FunctionalModelExtensionProvider extends Object
Provides funtional extensions forEObject
-based models via model operation custom implementations. Extensions may be registered via theregisterExtension(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 Summary
Constructors Constructor Description FunctionalModelExtensionProvider()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> T
getExtension(Class<T> extensionType)
Gets required extensionstatic FunctionalModelExtensionProvider
getInstance()
Gets the only instance of this provider<T> void
registerExtension(T extension, Class<T> extensionType)
Registers a new extension
-
-
-
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 benull
- 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 benull
extensionType
- A type of an extension. May not benull
-
-