public abstract class AbstractTextStreamFormatGenerator extends Object
AbstractTextStreamFormat.| Modifier and Type | Field and Description |
|---|---|
protected EmitContext |
context
The current context.
|
protected ModelDeclaration |
model
The target model.
|
| Constructor and Description |
|---|
AbstractTextStreamFormatGenerator(EmitContext context,
ModelDeclaration model,
TextFormatSettings formatSettings,
TextFieldSettings fieldDefaultSettings)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract List<Statement> |
createGetTextFormatInternal()
Returns a body of
AbstractTextStreamFormat.getTextFormat(). |
protected void |
emit(String description)
Emits an implementation of
AbstractTextStreamFormat class as a Java compilation unit. |
protected abstract boolean |
isSplittableInternal()
Returns whether or not the input is splittable.
|
protected Expression |
resolve(boolean value)
Resolves a value.
|
protected Expression |
resolve(char value)
Resolves a value.
|
protected Type |
resolve(ClassName type)
Resolves a value.
|
protected Expression |
resolve(Enum<?> value)
Resolves a value.
|
protected Expression |
resolve(String value)
Resolves a value.
|
protected final EmitContext context
protected final ModelDeclaration model
public AbstractTextStreamFormatGenerator(EmitContext context, ModelDeclaration model, TextFormatSettings formatSettings, TextFieldSettings fieldDefaultSettings)
context - the current contextmodel - the target modelformatSettings - the text format settingsfieldDefaultSettings - the field default settingsprotected void emit(String description) throws IOException
AbstractTextStreamFormat class as a Java compilation unit.description - the format descriptionIOException - if I/O error was occurred while emitting the compilation unitprotected abstract List<Statement> createGetTextFormatInternal()
AbstractTextStreamFormat.getTextFormat().protected abstract boolean isSplittableInternal()
true if it is splittable, otherwise falseprotected Expression resolve(boolean value)
value - the valueprotected Expression resolve(char value)
value - the valueprotected Expression resolve(String value)
value - the valueprotected Expression resolve(Enum<?> value)
value - the valueCopyright © 2011–2019 Asakusa Framework Team. All rights reserved.