public class ReadStructure extends java.lang.Object
*.stc
file
which contains the structure informations of a already translated file.
#readStructToClassData(String sClassFileName)
called inside Java2C_Main#runrunFirstPass(java.io.File javaFile, boolean)
,
if either the source *.java
is not present to parse (for basics)
or the destination file should not be generated because it exists and the
source *.java
file isn't newer than the already translated destination.
org.vishia.zbnf.ZbnfJavaOutput#setOutputStrict(Object result, ZbnfParseResultItem, Report)
.
The result is this instance.
Java2Cstc.zbnf
in form:
Structure::= J2C: structure of file-class: <$?fileName> { class. All syntax/semantic elements have a representation in this class, because} \e. ClassData::= <*; ?nameJava> ; <$?nameC> ; \{ [ fieldIdents \{ [{ field; }] \}] [ typeIdents \{ [{ | class }] \}] [ methods \{ [{ }] \}] [ InnerClass \{ [{ class }] \}] \}. field::= <1*?modeAccess><1*?modeArrayElement><1*?modeStatic>; [{\[ [\?\?|<*\]?fixArraySizes>]\]}] ; <*; ?typeJava> ; <$?typeC> ; <$?name> ; . type::= type; <$?typeName>. method::= method ; <*;?keyName> ; <$?javaName> ; <$?CName> ; return ; [{ param ( ) }] .
org.vishia.zbnf.ZbnfJavaOutput#setOutputStrict(Object result, ZbnfParseResultItem, Report)
.
sets the result of parsing directly in the instance result
of this class.Modifier and Type | Class and Description |
---|---|
static class |
ReadStructure.Zbnf_Cast |
static class |
ReadStructure.Zbnf_ClassData
Subclass to pour in the result of the
ClassData::=... subsyntax. |
static class |
ReadStructure.Zbnf_EnvIdent |
static class |
ReadStructure.Zbnf_Field
Subclass to pour in the result of the
field::=... subsyntax. |
static class |
ReadStructure.Zbnf_Method
Subclass to pour in the result of the
method::=... subsyntax. |
static class |
ReadStructure.ZbnfToplevel |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
sVersion
Version, history and license.
|
Modifier and Type | Method and Description |
---|---|
void |
postPrepare(ReadStructure.ZbnfToplevel zbnfToplevel)
Build the classData of the read stc-data.
|
void |
prepareCastTo(ReadStructure.Zbnf_Cast value,
org.vishia.java2C.ClassData classData) |
void |
prepareClassData(ReadStructure.Zbnf_ClassData zbnfInput,
ReadStructure.ZbnfToplevel zbnfToplevel,
org.vishia.java2C.ClassData outerClassData) |
FieldData |
prepareField(ReadStructure.Zbnf_Field field,
org.vishia.java2C.ClassData classData) |
void |
prepareMethod(ReadStructure.Zbnf_Method m,
org.vishia.java2C.ClassData classData) |
FieldData |
prepareParam(ReadStructure.Zbnf_Field param,
org.vishia.java2C.ClassData classData) |
void |
readStructToClassData(JavaSrcTreeFile javaSrc,
java.lang.String sClassFileName,
java.io.File fileStruct)
reads the structure of a class from a *.stc-File and save it to the
#userTypes -ClassData . |
public static final java.lang.String sVersion
prepareClassData(Zbnf_ClassData, ZbnfToplevel, ClassData)
invokes recursively for inner classes
at end of routine, because the ClassData should be known for the inner classes via fileLevelIdents.
public void readStructToClassData(JavaSrcTreeFile javaSrc, java.lang.String sClassFileName, java.io.File fileStruct) throws java.io.FileNotFoundException, java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalAccessException, java.lang.InstantiationException, java.text.ParseException
#userTypes
-ClassData
.sClassFileName
- The name of the Java class.java.io.FileNotFoundException
java.io.IOException
java.lang.IllegalArgumentException
java.lang.IllegalAccessException
java.lang.InstantiationException
java.text.ParseException
public void postPrepare(ReadStructure.ZbnfToplevel zbnfToplevel) throws java.lang.IllegalArgumentException, java.lang.IllegalAccessException, java.lang.InstantiationException, java.text.ParseException, java.io.FileNotFoundException, java.io.IOException
java.text.ParseException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.IllegalArgumentException
java.io.IOException
java.io.FileNotFoundException
public void prepareClassData(ReadStructure.Zbnf_ClassData zbnfInput, ReadStructure.ZbnfToplevel zbnfToplevel, org.vishia.java2C.ClassData outerClassData) throws java.lang.IllegalArgumentException, java.lang.IllegalAccessException, java.lang.InstantiationException, java.text.ParseException
java.lang.IllegalArgumentException
java.lang.IllegalAccessException
java.lang.InstantiationException
java.text.ParseException
public FieldData prepareField(ReadStructure.Zbnf_Field field, org.vishia.java2C.ClassData classData) throws java.lang.IllegalArgumentException, java.lang.IllegalAccessException, java.lang.InstantiationException, java.text.ParseException
java.lang.IllegalArgumentException
java.lang.IllegalAccessException
java.lang.InstantiationException
java.text.ParseException
public void prepareMethod(ReadStructure.Zbnf_Method m, org.vishia.java2C.ClassData classData) throws java.io.FileNotFoundException, java.lang.IllegalArgumentException, java.io.IOException, java.lang.IllegalAccessException, java.lang.InstantiationException, java.text.ParseException
java.io.FileNotFoundException
java.lang.IllegalArgumentException
java.io.IOException
java.lang.IllegalAccessException
java.lang.InstantiationException
java.text.ParseException
public void prepareCastTo(ReadStructure.Zbnf_Cast value, org.vishia.java2C.ClassData classData) throws java.text.ParseException
java.text.ParseException
public FieldData prepareParam(ReadStructure.Zbnf_Field param, org.vishia.java2C.ClassData classData) throws java.io.FileNotFoundException, java.lang.IllegalArgumentException, java.io.IOException, java.lang.IllegalAccessException, java.lang.InstantiationException, java.text.ParseException
java.io.FileNotFoundException
java.lang.IllegalArgumentException
java.io.IOException
java.lang.IllegalAccessException
java.lang.InstantiationException
java.text.ParseException