Class SimpleModuleLoaderStrategy
java.lang.Object
gov.nist.secauto.metaschema.databind.SimpleModuleLoaderStrategy
- All Implemented Interfaces:
IBindingContext.IModuleLoaderStrategy
public class SimpleModuleLoaderStrategy
extends Object
implements IBindingContext.IModuleLoaderStrategy
-
Constructor Summary
ModifierConstructorDescriptionprotected
SimpleModuleLoaderStrategy
(IBindingContext bindingContext) -
Method Summary
Modifier and TypeMethodDescriptiongetBoundDefinitionForClass
(Class<? extends IBoundObject> clazz) Get theIBoundDefinitionModel
instance associated with the provided Java class.loadModule
(Class<? extends IBoundModule> clazz) Load the bound Metaschema module represented by the provided class.
-
Constructor Details
-
SimpleModuleLoaderStrategy
-
-
Method Details
-
loadModule
Description copied from interface:IBindingContext.IModuleLoaderStrategy
Load the bound Metaschema module represented by the provided class.Implementations are allowed to return a cached instance if the module has already been loaded.
- Specified by:
loadModule
in interfaceIBindingContext.IModuleLoaderStrategy
- Parameters:
clazz
- the Module class- Returns:
- the module
-
getBoundDefinitionForClass
public IBoundDefinitionModelComplex getBoundDefinitionForClass(@NonNull Class<? extends IBoundObject> clazz) Description copied from interface:IBindingContext.IModuleLoaderStrategy
Get theIBoundDefinitionModel
instance associated with the provided Java class.Typically the class will have a
MetaschemaAssembly
orMetaschemaField
annotation.- Specified by:
getBoundDefinitionForClass
in interfaceIBindingContext.IModuleLoaderStrategy
- Parameters:
clazz
- the class binding to load- Returns:
- the associated class binding instance or
null
if the class is not bound
-