Class Utils

java.lang.Object
net.ssehub.easy.standalone.cmd.Utils

class Utils extends Object
Command line utility functions.
Author:
El-Sharkawy, Holger Eichelberger
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The pseudo bundle identification for logging.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    Prevents external creation.
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) static <M extends net.ssehub.easy.basics.modelManagement.IModel>
    M
    loadPreferredModel(net.ssehub.easy.basics.modelManagement.ModelManagement<M> modelMgmt, net.ssehub.easy.basics.modelManagement.IModelData modelDefinition, File... locations)
    Loads a model with the specified (model name, version) pair from the given ModelManagement instance.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • Utils

      private Utils()
      Prevents external creation.
  • Method Details

    • loadPreferredModel

      static <M extends net.ssehub.easy.basics.modelManagement.IModel> M loadPreferredModel(net.ssehub.easy.basics.modelManagement.ModelManagement<M> modelMgmt, net.ssehub.easy.basics.modelManagement.IModelData modelDefinition, File... locations) throws net.ssehub.easy.basics.modelManagement.ModelManagementException
      Loads a model with the specified (model name, version) pair from the given ModelManagement instance. The model will only be loaded, if it can be loaded from the given locations (ordering of parameters will be considered).
      Type Parameters:
      M - The specific model type, will be derived from the ModelManagement instance. Will be Project or Script.
      Parameters:
      modelMgmt - The ModelManagement instance from where the IModel should be loaded from, i.e. VarModel.INSTANCE or BuildModel.INSTANCE.
      modelDefinition - A (model name, version) pair for specifying which IModel should be loaded.
      locations - A ordered list of locations from where the IModel should be loaded from.
      Returns:
      A loaded IModel or null.
      Throws:
      net.ssehub.easy.basics.modelManagement.ModelManagementException - In case that the available information may become inconsistent due to this update