Class GenerationStatus

  • All Implemented Interfaces:
    IStatus

    public final class GenerationStatus
    extends Object
    implements IStatus
    • Method Detail

      • getOutputModel

        @Nullable
        public SModel getOutputModel()
        Returns:
        primary output model, or null in case of transformation failure; to get all forked output models, use getOutputModels() instead
      • getInputModel

        public SModel getInputModel()
      • getOutputRepository

        public SRepository getOutputRepository()
        Repository one need to guard access to when working with output model. FIXME Perhaps, repository should be part of GResource, instead. Design of the whole thing is not clear to me yet. With transient models/modules living in a distinct repository, we need to lock proper one when accessing transient models, and this method is to give access to the one.
        Returns:
        generally, shall not return null, uses input model's repository as fallback. However, if both input and output model are not from a repository, you can face null.
      • getOutputModels

        @NotNull
        public Collection<SModel> getOutputModels()
        Returns:
        empty collection for failed transformation; singleton collection unless there were forks in generation plan. Output model of a primary 'trunk' always comes first.
      • setCrossModelEnvironment

        public void setCrossModelEnvironment​(CrossModelEnvironment cme)
        PROVISIONAL CODE. DO NOT USE! GenerationStatus serves as a container for data associated with model generation step. However, some of these associates has nothing to do with generation (e.g. ModelDependencies are purely textgen aspect), and some are just exposed here to be accessed, and has nothing to do with generation status. CrossModelEnvironment object keeps cross-model generation aspect and as such qualifies to be exposed from GS, however, with better structure of CacheGenerators we unlikely to need it here (this might be generic 'AuxGeneratedDataSupplier' which would tell desired location (sourcegen or caches) and accept StreamHandler to save whatever it needs to save (either exports model or 'trace.info' xml)