Package jetbrains.mps.text
Interface TextUnit
- 
- All Known Subinterfaces:
 CompatibilityTextUnit
- All Known Implementing Classes:
 JavaTextUnit,RegularTextUnit
public interface TextUnitUnit of text generation, corresponds to output file. Bears attributes relevant to file, e.g. name, encoding, location keys, etc. Tracks inputs that served to populate the unit.- Since:
 - 3.3
 
 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classTextUnit.Status 
- 
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidgenerate()byte[]getBytes()FIXME decide whether throws exception or return null/empty value if not yet generated.CharsetgetEncoding()FIXME makes sense for text/string output only.StringgetFileName()default StringgetFilePath()PROVISIONAL API Perhaps, shall stick to Path object rather than plain String Tell desired location of the text outcomeSNodegetStartNode()TextUnit.StatusgetState() 
 - 
 
- 
- 
Method Detail
- 
generate
void generate()
 
- 
getFilePath
@Nullable default String getFilePath()
PROVISIONAL API Perhaps, shall stick to Path object rather than plain String Tell desired location of the text outcome- Returns:
 nullto use default value derived from qualified model name.
 
- 
getBytes
byte[] getBytes()
FIXME decide whether throws exception or return null/empty value if not yet generated. 
- 
getEncoding
Charset getEncoding()
FIXME makes sense for text/string output only. Shall decide whether we keep binary/textual generation separate, or combine under single API, and what to do in case of binary file with encoding? 
- 
getState
TextUnit.Status getState()
 
 - 
 
 -