Class UsedDefinitionModelWalker
- java.lang.Object
-
- gov.nist.secauto.metaschema.core.model.ModelWalker<Void>
-
- gov.nist.secauto.metaschema.core.model.DefinitionCollectingModelWalker
-
- gov.nist.secauto.metaschema.core.model.UsedDefinitionModelWalker
-
public class UsedDefinitionModelWalker extends DefinitionCollectingModelWalker
This model walker can be used to gather metaschema definitions that are defined globally.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
UsedDefinitionModelWalker()
Construct a new walker.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Collection<? extends IDefinition>
collectUsedDefinitions(Collection<? extends IAssemblyDefinition> definitions)
Get the collection of all definitions used directly and transitively by the provided definitions.static Collection<? extends IDefinition>
collectUsedDefinitionsFromModule(IModule module)
Collect the globally defined Metaschema definitions from the provided Metaschema module, and any Metaschema modules imported directly or indirectly by this module.static Collection<? extends IDefinition>
collectUsedDefinitionsFromModule(Collection<? extends IModule> modules)
Collect the globally defined Metaschema definitions from the provided Metaschema modules, and any Metaschema modules imported directly or indirectly by these modules.-
Methods inherited from class gov.nist.secauto.metaschema.core.model.DefinitionCollectingModelWalker
getDefaultData, getDefinitions, getFilter, visit, visit, visit
-
Methods inherited from class gov.nist.secauto.metaschema.core.model.ModelWalker
visit, visit, visit, visit, walk, walk, walk, walk, walk, walk, walk, walk, walk, walk, walkDefinition, walkDefinition, walkFlagInstances, walkModelInstance, walkModelInstances
-
-
-
-
Constructor Detail
-
UsedDefinitionModelWalker
protected UsedDefinitionModelWalker()
Construct a new walker.
-
-
Method Detail
-
collectUsedDefinitions
@NonNull public static Collection<? extends IDefinition> collectUsedDefinitions(Collection<? extends IAssemblyDefinition> definitions)
Get the collection of all definitions used directly and transitively by the provided definitions.- Parameters:
definitions
- a collection of definitions to generate used definitions from- Returns:
- the collection of used definitions
-
collectUsedDefinitionsFromModule
@NonNull public static Collection<? extends IDefinition> collectUsedDefinitionsFromModule(@NonNull Collection<? extends IModule> modules)
Collect the globally defined Metaschema definitions from the provided Metaschema modules, and any Metaschema modules imported directly or indirectly by these modules.- Parameters:
modules
- the Metaschema modules to analyze- Returns:
- a collection of matching definitions
-
collectUsedDefinitionsFromModule
@NonNull public static Collection<? extends IDefinition> collectUsedDefinitionsFromModule(@NonNull IModule module)
Collect the globally defined Metaschema definitions from the provided Metaschema module, and any Metaschema modules imported directly or indirectly by this module.- Parameters:
module
- the metaschema module to analyze- Returns:
- a collection of matching definitions
-
-