protected class UMod2format.Compiler extends GenericCompiler
Modifier and Type | Class and Description |
---|---|
protected class |
UMod2format.Compiler.Subformat |
Modifier and Type | Field and Description |
---|---|
protected Format |
curmodel
Keeps track of the data object which is currently rendered to a Format.
|
protected UMod.Forest |
currentumod
Needed for find the class definitions (/types) of fields referred to.
|
protected UMod.Type |
curtype
The aggregate type, if current "modelname" is a Mapoid, else the
type of the current model (even if it is an item of a Listoid).
|
protected UMod.FieldDef |
fieldfound
set by
visit(Element_ref) and read
only for error diagnosisonly by
#Subformat.visit(Elemetn_child and visit(Element_switch) |
protected Format |
modeSelected |
protected int |
nextSubformatIndex |
protected Format |
submodelfound
|
protected UMod.Type |
subtypefound
|
protected UMod.ClassDef |
topleveldef
Needed ONLY for error message generateion.
|
callFunctionForRaisingException, checkedmode, constcache, exprCache, fresult, isdynamic, MODIF_CONST, msg, NAME_CONST_FORMAT_EMPTY, NAME_METHOD_THROW_TAKE_ALTERNATIVE, NAME_VAR_DEFAULT_INDENT, NAME_VAR_FORMAT_RESULT, NAME_VAR_MODE, rec, REF_FORMAT_Format, targetclass, WRAPPEDCLASS_CompoundConstructor, WRAPPEDCLASS_Format, WRAPPEDCLASS_Function, WRAPPEDCLASS_ListoidFormatter, WRAPPEDCLASS_Lists, WRAPPEDCLASS_MapEntry, WRAPPEDCLASS_MapoidFormatter, WRAPPEDCLASS_Object, WRAPPEDCLASS_TakeAlternativeException, WRAPPEDCLASS_TryerCatcher
validating
Constructor and Description |
---|
Compiler(UMod.Forest umod0,
MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg)
Derived consructor which additionally only sets the current umod model.
|
Modifier and Type | Method and Description |
---|---|
void |
compileOnePattern(UMod.ClassDef cd,
GeneratedMethod gm0,
String code,
String initialModel)
Derived method which parses the format code of one
class definition into a tdom, then sets
the current model and its type, and finally calls the base method.
|
protected void |
error(Locatable<XMLDocumentIdentifier> loc,
String text) |
protected UMod.ClassDef |
getclassdef(UMod.T_reference t) |
protected Format |
getCurrentModel()
Currently only needed to compile
escapeToJava() in the variant operating
directly on the model element. |
void |
initTransformerClass(GeneratedClass gc)
A specialization of
GenericCompiler.initTransformerClass() ,
because a local field must be accesssed. |
void |
makeclassstring(Locatable<XMLDocumentIdentifier> loc,
boolean upcase) |
protected eu.bandm.tools.formatfrontends.absy.Document_pattern |
parseHint(String hint,
MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg) |
protected void |
tdomonly(eu.bandm.tools.formatfrontends.absy.Element el,
String token) |
void |
visit(eu.bandm.tools.formatfrontends.absy.Element_child element) |
void |
visit(eu.bandm.tools.formatfrontends.absy.Element_clss element) |
void |
visit(eu.bandm.tools.formatfrontends.absy.Element_clssUPCASE element) |
void |
visit(eu.bandm.tools.formatfrontends.absy.Element_from element) |
void |
visit(eu.bandm.tools.formatfrontends.absy.Element_instanceTest el)
<!ELEMENT instanceTest (ref, ref?) > |
void |
visit(eu.bandm.tools.formatfrontends.absy.Element_mode element) |
void |
visit(eu.bandm.tools.formatfrontends.absy.Element_numberedref element) |
void |
visit(eu.bandm.tools.formatfrontends.absy.Element_ref element)
Only sets "subtypefound" to the type of the field and "submodelfound"
to the Format of the field getter function.
|
void |
visit(eu.bandm.tools.formatfrontends.absy.Element_supr element)
Creates a call to the format converting routine defined for the
superclass.
Attention currently: must assume that format of some superclass (if any) has already been translated. |
void |
visit(eu.bandm.tools.formatfrontends.absy.Element_swtch element) |
void |
visit(eu.bandm.tools.formatfrontends.absy.Element_t_alt el) |
void |
visit(eu.bandm.tools.formatfrontends.absy.Element_t_choice el) |
void |
visit(eu.bandm.tools.formatfrontends.absy.Element_t_seq el) |
void |
visit(eu.bandm.tools.formatfrontends.absy.Element_text element) |
void |
visit(eu.bandm.tools.formatfrontends.absy.Element_thiz element) |
void |
visit(eu.bandm.tools.formatfrontends.absy.Element_too element) |
protected void |
warning(Locatable<XMLDocumentIdentifier> loc,
String text) |
checkconst, compileCallToFormatText, compileModeSwitch, compileOnePattern, create_resultfield, expr, getMsgReceiver, process_compound, refer, setMsgReceiver, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit
visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit
visit
protected UMod.ClassDef topleveldef
protected UMod.Forest currentumod
getclassdef(UMod.T_reference)
.protected Format curmodel
protected UMod.Type curtype
#modelname
the value of this field is ...
java type of current model | value of curtype |
MapEntry<D,R> | T_map/T_multimap |
anObjectT | T_reference / .javaDecl=anObjectT |
protected UMod.Type subtypefound
protected Format submodelfound
protected final Format modeSelected
protected UMod.FieldDef fieldfound
visit(Element_ref)
and read
only for error diagnosisonly by
#Subformat.visit(Elemetn_child
and visit(Element_switch)
protected int nextSubformatIndex
public Compiler(UMod.Forest umod0, MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg)
protected Format getCurrentModel()
GenericCompiler
escapeToJava()
in the variant operating
directly on the model element.
Introduced 20170428.getCurrentModel
in class GenericCompiler
protected void error(Locatable<XMLDocumentIdentifier> loc, String text)
protected void warning(Locatable<XMLDocumentIdentifier> loc, String text)
public void initTransformerClass(GeneratedClass gc)
GenericCompiler.initTransformerClass()
,
because a local field must be accesssed.initTransformerClass
in class GenericCompiler
public void compileOnePattern(UMod.ClassDef cd, GeneratedMethod gm0, String code, String initialModel)
protected eu.bandm.tools.formatfrontends.absy.Document_pattern parseHint(String hint, MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg)
protected void tdomonly(eu.bandm.tools.formatfrontends.absy.Element el, String token)
public void visit(eu.bandm.tools.formatfrontends.absy.Element_t_seq el)
visit
in class eu.bandm.tools.formatfrontends.absy.Visitor
public void visit(eu.bandm.tools.formatfrontends.absy.Element_t_alt el)
visit
in class eu.bandm.tools.formatfrontends.absy.Visitor
public void visit(eu.bandm.tools.formatfrontends.absy.Element_t_choice el)
visit
in class eu.bandm.tools.formatfrontends.absy.Visitor
public void visit(eu.bandm.tools.formatfrontends.absy.Element_instanceTest el)
<!ELEMENT instanceTest (ref, ref?) >
visit
in class eu.bandm.tools.formatfrontends.absy.Visitor
public void makeclassstring(Locatable<XMLDocumentIdentifier> loc, boolean upcase)
public void visit(eu.bandm.tools.formatfrontends.absy.Element_clss element)
visit
in class eu.bandm.tools.formatfrontends.absy.Visitor
public void visit(eu.bandm.tools.formatfrontends.absy.Element_clssUPCASE element)
visit
in class eu.bandm.tools.formatfrontends.absy.Visitor
protected UMod.ClassDef getclassdef(UMod.T_reference t)
public void visit(eu.bandm.tools.formatfrontends.absy.Element_thiz element)
visit
in class eu.bandm.tools.formatfrontends.absy.Visitor
public void visit(eu.bandm.tools.formatfrontends.absy.Element_mode element)
visit
in class eu.bandm.tools.formatfrontends.absy.Visitor
public void visit(eu.bandm.tools.formatfrontends.absy.Element_from element)
visit
in class eu.bandm.tools.formatfrontends.absy.Visitor
public void visit(eu.bandm.tools.formatfrontends.absy.Element_too element)
visit
in class eu.bandm.tools.formatfrontends.absy.Visitor
public void visit(eu.bandm.tools.formatfrontends.absy.Element_numberedref element)
visit
in class eu.bandm.tools.formatfrontends.absy.Visitor
public void visit(eu.bandm.tools.formatfrontends.absy.Element_ref element)
visit
in class eu.bandm.tools.formatfrontends.absy.Visitor
public void visit(eu.bandm.tools.formatfrontends.absy.Element_text element)
visit
in class eu.bandm.tools.formatfrontends.absy.Visitor
public void visit(eu.bandm.tools.formatfrontends.absy.Element_swtch element)
visit
in class eu.bandm.tools.formatfrontends.absy.Visitor
public void visit(eu.bandm.tools.formatfrontends.absy.Element_supr element)
visit
in class eu.bandm.tools.formatfrontends.absy.Visitor
public void visit(eu.bandm.tools.formatfrontends.absy.Element_child element)
visit
in class eu.bandm.tools.formatfrontends.absy.Visitor
see also the complete user documentation .