- All Superinterfaces:
IModule,IModuleExtended<IBoundModule,IBoundDefinitionModelComplex, IBoundDefinitionFlag, IBoundDefinitionModelField<?>, IBoundDefinitionModelAssembly>
- All Known Implementing Classes:
AbstractBoundModule,MetaschemaBindingsModule,MetaschemaModelModule,MetaschemaTestSuiteModule
public interface IBoundModule
extends IModuleExtended<IBoundModule,IBoundDefinitionModelComplex,IBoundDefinitionFlag,IBoundDefinitionModelField<?>,IBoundDefinitionModelAssembly>
Represents a bound Metaschema module that provides access to its field and
assembly definitions through Java class bindings.
-
Method Summary
Modifier and TypeMethodDescriptionRetrieves the top-level assembly definition in this Metaschema module with the matching name, if it exists.Retrieves the top-level assembly definitions in this Metaschema module.Get the Module binding context.Retrieves the top-level field definition in this Metaschema module with the matching name, if it exists.Retrieves the top-level field definitions in this Metaschema module.default URIRetrieves the location where the Metaschema module was loaded from.static IBoundModulenewInstance(Class<? extends IBoundModule> clazz, IBindingContext bindingContext, List<? extends IBoundModule> importedModules) Create a new instance of a bound module using reflection.Methods inherited from interface dev.metaschema.core.model.IModule
getExportedRootAssemblyDefinitionByName, getJsonBaseUri, getLocationHint, getModuleStaticContext, getName, getNamespaceBindings, getQName, getRemarks, getShortName, getSource, getVersion, getXmlNamespaceMethods inherited from interface dev.metaschema.core.model.IModuleExtended
getAssemblyAndFieldDefinitions, getExportedAssemblyDefinitionByName, getExportedAssemblyDefinitions, getExportedFieldDefinitionByName, getExportedFieldDefinitions, getExportedFlagDefinitionByName, getExportedFlagDefinitions, getExportedRootAssemblyDefinitions, getFlagDefinitionByName, getFlagDefinitions, getImportedModuleByShortName, getImportedModules, getRootAssemblyDefinitions, getScopedAssemblyDefinitionByName, getScopedFieldDefinitionByName, getScopedFlagDefinitionByName
-
Method Details
-
newInstance
@NonNull static IBoundModule newInstance(@NonNull Class<? extends IBoundModule> clazz, @NonNull IBindingContext bindingContext, @NonNull List<? extends IBoundModule> importedModules) Create a new instance of a bound module using reflection.- Parameters:
clazz- the bound module class to instantiatebindingContext- the binding context for the moduleimportedModules- the list of modules imported by this module- Returns:
- the new module instance
- Throws:
IllegalArgumentException- if the module cannot be instantiated
-
getBindingContext
Get the Module binding context.- Returns:
- the context
-
getLocation
Description copied from interface:IModuleRetrieves the location where the Metaschema module was loaded from.- Specified by:
getLocationin interfaceIModule- Returns:
- the location, or
nullif this information is not available
-
getAssemblyDefinitions
Collection<IBoundDefinitionModelAssembly> getAssemblyDefinitions()Description copied from interface:IModuleRetrieves the top-level assembly definitions in this Metaschema module.- Specified by:
getAssemblyDefinitionsin interfaceIModule- Specified by:
getAssemblyDefinitionsin interfaceIModuleExtended<IBoundModule,IBoundDefinitionModelComplex, IBoundDefinitionFlag, IBoundDefinitionModelField<?>, IBoundDefinitionModelAssembly> - Returns:
- the collection of assembly definitions
-
getAssemblyDefinitionByName
Description copied from interface:IModuleRetrieves the top-level assembly definition in this Metaschema module with the matching name, if it exists.- Specified by:
getAssemblyDefinitionByNamein interfaceIModule- Specified by:
getAssemblyDefinitionByNamein interfaceIModuleExtended<IBoundModule,IBoundDefinitionModelComplex, IBoundDefinitionFlag, IBoundDefinitionModelField<?>, IBoundDefinitionModelAssembly> - Parameters:
name- the definition name- Returns:
- the matching assembly definition, or
nullif none match
-
getFieldDefinitions
Collection<IBoundDefinitionModelField<?>> getFieldDefinitions()Description copied from interface:IModuleRetrieves the top-level field definitions in this Metaschema module.- Specified by:
getFieldDefinitionsin interfaceIModule- Specified by:
getFieldDefinitionsin interfaceIModuleExtended<IBoundModule,IBoundDefinitionModelComplex, IBoundDefinitionFlag, IBoundDefinitionModelField<?>, IBoundDefinitionModelAssembly> - Returns:
- the collection of field definitions
-
getFieldDefinitionByName
Description copied from interface:IModuleRetrieves the top-level field definition in this Metaschema module with the matching name, if it exists.- Specified by:
getFieldDefinitionByNamein interfaceIModule- Specified by:
getFieldDefinitionByNamein interfaceIModuleExtended<IBoundModule,IBoundDefinitionModelComplex, IBoundDefinitionFlag, IBoundDefinitionModelField<?>, IBoundDefinitionModelAssembly> - Parameters:
name- the definition name- Returns:
- the matching field definition, or
nullif none match
-