Package jetbrains.mps.generator.impl
Interface ModelStreamManager
- 
- All Known Implementing Classes:
 DefaultStreamManager,DeployedStreamManager
public interface ModelStreamManagerPROVISIONAL API, likely to become generic and move somewhere else (like smodel module). Facility to keep (persist) data associated with a model. It's quite common task to keep information that is associated with a given model but is not substantial/essential part of the model, or is specific to platform/implementation/process. We keep this in a form of named streams. Different aspects/locations are explicit now, however, they might become (or get extended with) generic accessor (once we need extensible set of locations). With support for multiple generation targets, we would likely add appropriate accessors with target identification, however, at the moment, with single generation target this doesn't seem reasonable. At the moment primary purpose is to abstract away output/cache location so that rest of the code doesn't care whether it shall call TextGenUtil.getOutputDir, AbstractModule.getOutputPath or FileGenerationUtil.getDefaultOutputDir(), and callee code have control over locations queried. 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceModelStreamManager.ProviderKnows where data associated with the model is kept. 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description MultiStreamDataSourcegetCachesLocation()Access location where generated cache files for the model reside.SModelReferencegetModel()MultiStreamDataSourcegetOutputLocation()Access location where generated files for the model reside. 
 - 
 
- 
- 
Method Detail
- 
getModel
SModelReference getModel()
- Returns:
 - model this stream manager is associated with
 
 
- 
getOutputLocation
@NotNull MultiStreamDataSource getOutputLocation()
Access location where generated files for the model reside. IMPLEMENTATION NOTE: Now, for BL/Java this is equivalent to a folder under source_gen/ with a name corresponding to model long name- Returns:
 - named stream accessor
 
 
- 
getCachesLocation
MultiStreamDataSource getCachesLocation()
Access location where generated cache files for the model reside. IMPLEMENTATION NOTE: Now, for BL/Java this is equivalent to a folder under source_gen.caches/ with a name corresponding to model long name- Returns:
 - named stream accessor
 
 
 - 
 
 -