Package jetbrains.mps.generator.runtime
Interface TemplateModel
- 
- All Known Subinterfaces:
 TemplateModel2
- All Known Implementing Classes:
 TemplateModelBase,TemplateModelInterpreted
public interface TemplateModelEvgeny Gryaznov, Nov 29, 2010 
- 
- 
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description Collection<TemplateMappingConfiguration>getConfigurations()StringgetLongName()TemplateModulegetModule()GeneratorQueryProvidergetQueryProvider()FIXME PROVISIONAL CODE (return value), expose GQP in generator.runtime package Besides, now the caching is done in QueryProviderCache, so implementation is not obliged to keep the instance.SModelReferencegetSModelReference()Collection<TemplateSwitchMapping>getSwitches()default TemplateDeclarationloadTemplate(SNodeReference template, Object... arguments)Deprecated.replaced withTemplateModel2.loadTemplate(TemplateDeclarationKey). 
 - 
 
- 
- 
Method Detail
- 
getLongName
String getLongName()
 
- 
getSModelReference
SModelReference getSModelReference()
 
- 
getSwitches
Collection<TemplateSwitchMapping> getSwitches()
 
- 
getConfigurations
Collection<TemplateMappingConfiguration> getConfigurations()
 
- 
loadTemplate
@Deprecated default TemplateDeclaration loadTemplate(SNodeReference template, Object... arguments)
Deprecated.replaced withTemplateModel2.loadTemplate(TemplateDeclarationKey). This method is not generated in new templates, and is overridden in legacy code only, where TemplateModel is not TM2 
- 
getModule
TemplateModule getModule()
 
- 
getQueryProvider
GeneratorQueryProvider getQueryProvider()
FIXME PROVISIONAL CODE (return value), expose GQP in generator.runtime package Besides, now the caching is done in QueryProviderCache, so implementation is not obliged to keep the instance. It could, however. XXX On one hand, we need a generic API to access queries and thus shall override the method in generated templates, OTOH, it's unlikely (error?) to use QueryProvider of a generated template as the code there invokes queries without the need for GQP (unless I decide to use QueryKey there and hold query instances). There might be another reason to give access to GQP from generated templates! If we enable a 'forced interpretation' mode when we interpret templates otherwise available as compiled. Not sure there's need for such functionality though, no requests have been made so far, nevertheless, I can't preclude a need like that one e.g. for bootstrap reasons.- Returns:
 nullif there's no generated provider, or it had failed to load- Since:
 - 3.5
 
 
 - 
 
 -