public class GenJavaOutClass
extends java.lang.Object
GenZbnfJavaData
and from GenXmlCfgJavaData
.
For generating the source the OutTextPreparer
is used. It means the sources are given as templates,
one for each part.
OutTextPreparer
with the JZtxtcmd script executer:OutTextPreparer
is similar the JZtxtcmd
but more simple in execution.
For JZtxtcmd the template for the sources is really given in a textual file.
Here the template for the sources are contained in this class as Strings.
It may be possible to read the Strings from a file, for more flexibility to change the sources.Modifier and Type | Class and Description |
---|---|
static class |
GenJavaOutClass.CmdArgs
Command line args
|
static class |
GenJavaOutClass.SubClassField |
static class |
GenJavaOutClass.SubClassJava
Instances of this class describe a sub class in generated code.
|
class |
GenJavaOutClass.WrClassJava |
Modifier and Type | Field and Description |
---|---|
private GenJavaOutClass.CmdArgs |
cmdArgs
Command line args
|
java.util.Map<java.lang.String,GenJavaOutClass.SubClassJava> |
idxRegisteredCmpn
Index of already registered components to add in
listCmpn only one time. |
java.util.TreeMap<java.lang.String,java.lang.String> |
idxStdTypes
StandardTypes.
|
java.util.List<GenJavaOutClass.SubClassJava> |
listCmpn
The syntax components which are to process yet (are used for parse result storing).
|
private MainCmdLogging_ifc |
log |
private static java.util.Map<java.lang.String,java.lang.String> |
reservedNames |
private OutTextPreparer |
sJavaHeadZbnf
Text for Java header for Zbnf writer class.
|
private OutTextPreparer |
sJavaMetaClass |
private OutTextPreparer |
sJavaMetaClassOper |
private java.lang.String |
sJavaOutputDir |
(package private) java.util.Map<java.lang.String,java.lang.String> |
superTypes |
static java.lang.String |
sVersion
Version, history and license.
|
private OutTextPreparer |
tJavaCmpnClass_Base
Text for class header for syntax component data storing.
|
private OutTextPreparer |
tJavaCmpnClassUsg
Text for class header for syntax component to write from zbnf.
|
private OutTextPreparer |
tJavaCmpnClassZbnf
Text for class header for syntax component to write from zbnf.
|
private static java.lang.String |
tJavaCmpnEnd |
private OutTextPreparer |
tJavaCmpnZbnf |
private static java.lang.String |
tJavaEnd |
private OutTextPreparer |
tJavaHeadBase
Text for Java header.
|
private OutTextPreparer |
tJavaHeadUsg
Text for Java usage header.
|
private OutTextPreparer |
tJavaListCmpnZbnf |
private OutTextPreparer |
tJavaListVar |
private OutTextPreparer |
tJavaListVarOper |
private OutTextPreparer |
tJavaListVarZbnf |
private OutTextPreparer |
tJavaMetaClassZbnf |
private OutTextPreparer |
tJavaSimpleVar |
private OutTextPreparer |
tJavaSimpleVarOper |
private OutTextPreparer |
tJavaSimpleVarZbnf
typeNs: null on simple types as String, int.
|
private OutTextPreparer |
tJavaSuperTypeClass
Text for class header for syntax component data storing.
|
private java.io.Writer |
wr |
private java.io.Writer |
wru
Writer for the base data class and the Zbnf JavaOut class.
|
private java.io.Writer |
wrz
Writer for the base data class and the Zbnf JavaOut class.
|
Constructor and Description |
---|
GenJavaOutClass(GenJavaOutClass.CmdArgs args,
MainCmdLogging_ifc log) |
Modifier and Type | Method and Description |
---|---|
void |
closeWrite() |
void |
finishClassWrite() |
void |
finishCmpnWrite() |
static java.lang.String |
firstLowercase(java.lang.String src) |
static java.lang.String |
firstUppercase(java.lang.String src) |
void |
setupWriter() |
public static final java.lang.String sVersion
GenJavaOutClass.CmdArgs.fileOutStruct
: for argument output the struct.
See org.vishia.parseJava.JavaParser
and ZbnfParser.writeSyntaxStruct(Appendable)
.
ZbnfJavaOutput
since 2014-05, used for manual written files.
Now also for the generated ones. For other outputs (XML) it should be supplemented.
org.vishia.parseJava.JavaContent
GenZbnfJavaData
. It is compare able
with the last version from this class. Some changes made. Tested.
private final GenJavaOutClass.CmdArgs cmdArgs
private final MainCmdLogging_ifc log
private java.io.Writer wrz
private java.io.Writer wru
private java.io.Writer wr
private java.lang.String sJavaOutputDir
java.util.Map<java.lang.String,java.lang.String> superTypes
public final java.util.TreeMap<java.lang.String,java.lang.String> idxStdTypes
public java.util.List<GenJavaOutClass.SubClassJava> listCmpn
public java.util.Map<java.lang.String,GenJavaOutClass.SubClassJava> idxRegisteredCmpn
listCmpn
only one time.private static final java.util.Map<java.lang.String,java.lang.String> reservedNames
private final OutTextPreparer tJavaHeadBase
private final OutTextPreparer tJavaHeadUsg
private final OutTextPreparer sJavaHeadZbnf
private final OutTextPreparer tJavaSuperTypeClass
private final OutTextPreparer tJavaCmpnClass_Base
private final OutTextPreparer tJavaCmpnClassZbnf
private final OutTextPreparer tJavaCmpnClassUsg
private static final java.lang.String tJavaCmpnEnd
private static final java.lang.String tJavaEnd
private final OutTextPreparer tJavaSimpleVar
private final OutTextPreparer tJavaListVar
private final OutTextPreparer tJavaSimpleVarOper
private final OutTextPreparer tJavaListVarOper
private final OutTextPreparer tJavaSimpleVarZbnf
private final OutTextPreparer tJavaListVarZbnf
private final OutTextPreparer tJavaCmpnZbnf
private final OutTextPreparer tJavaListCmpnZbnf
private final OutTextPreparer sJavaMetaClass
private final OutTextPreparer sJavaMetaClassOper
private final OutTextPreparer tJavaMetaClassZbnf
public GenJavaOutClass(GenJavaOutClass.CmdArgs args, MainCmdLogging_ifc log)
public void setupWriter()
public void closeWrite()
public static java.lang.String firstUppercase(java.lang.String src)
public static java.lang.String firstLowercase(java.lang.String src)
public void finishCmpnWrite() throws java.io.IOException
java.io.IOException
public void finishClassWrite() throws java.io.IOException
java.io.IOException