public class Java2C_Main extends java.lang.Object implements RunRequiredFirstPass_ifc
Java2C
.Modifier and Type | Class and Description |
---|---|
static class |
Java2C_Main.CmdlineArgs
The gotten arguments from the command line are hold in this extra static class.
|
static class |
Java2C_Main.InputFileParseResult
The instance of this class is filled with the result of parsing an input file
given with
-if:INPFILE cmd line calling argument. |
Modifier and Type | Field and Description |
---|---|
static LocalIdents |
externalTypes
Contains all types
which are searched but not found in the Java2C translation.
|
CCodeData |
localReferenceDummy
A CCodeInfo instance useable as dummy for local variable.
|
static Java2C_Main |
singleton
The singleton instance of this class.
|
CRuntimeJavalikeClassData |
standardClassData
Instance with all
ClassData and LocalIdents for the classes
appropriated in the CRuntimeJavalike C runtime environment. |
CCodeData |
staticReferenceDummy
A CCodeInfo instance useable as dummy for static variable.
|
static java.lang.String |
sVersion
Version, history and license.
|
Modifier and Type | Method and Description |
---|---|
boolean |
addInputFilemask(java.lang.String sMask,
java.lang.String sCPrefix,
java.lang.String sCPostfix) |
static org.vishia.java2C.ClassData |
createExternalType(java.lang.String name,
java.lang.String pkg)
Creates a external type because no informations are available.
|
void |
execute()
Executes the translation for all files.
|
static JavaSrcTreePkg |
getOrAddRootPkg(java.lang.String sName)
Creates or searches a package which is a root package.
|
java.lang.String |
getPathOutCfiles() |
java.lang.String |
getPathOutHeader() |
java.lang.String |
getPathOutStcFiles() |
static LocalIdents |
getRootLevelIdents()
Gets the FileLevelidents of the root level.
|
static JavaSrcTreePkg |
getRootPkg(java.lang.String sName)
Searches a package which is a root package.
|
static void |
instanciateSingleton(Java2C_Main.CmdlineArgs args,
org.vishia.mainCmd.Report report)
The create routine for the singleton.
|
org.vishia.java2C.ClassData |
runRequestedFirstPass(JavaSrcTreeFile javaSrc,
java.lang.String sPkgClassName)
Runs the first pass.
|
public static final java.lang.String sVersion
public static final LocalIdents externalTypes
public CRuntimeJavalikeClassData standardClassData
ClassData
and LocalIdents
for the classes
appropriated in the CRuntimeJavalike C runtime environment. All this ClassData
are stored in #stdTypes
, which is the base of all LocalIdents
,
therefore this types are accessible in all scopes.
ClassData
of this standard types are need,
the access is done via the singleton
.standardClassData.public final CCodeData localReferenceDummy
public final CCodeData staticReferenceDummy
public static Java2C_Main singleton
public boolean addInputFilemask(java.lang.String sMask, java.lang.String sCPrefix, java.lang.String sCPostfix)
public static void instanciateSingleton(Java2C_Main.CmdlineArgs args, org.vishia.mainCmd.Report report)
public void execute() throws java.text.ParseException, java.io.FileNotFoundException, java.lang.IllegalArgumentException, java.io.IOException, java.lang.IllegalAccessException, java.lang.InstantiationException
java.text.ParseException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.io.IOException
java.lang.IllegalArgumentException
java.io.FileNotFoundException
public java.lang.String getPathOutCfiles()
public java.lang.String getPathOutHeader()
public java.lang.String getPathOutStcFiles()
public static final org.vishia.java2C.ClassData createExternalType(java.lang.String name, java.lang.String pkg)
name
- pkg
- public static final JavaSrcTreePkg getOrAddRootPkg(java.lang.String sName)
JavaSrcTreePkg#getOrAddPkg(String, String)
can be invoked to get or add a sub package or the method
{@link JavaSrcTreePkg#setFileJava(String, File, String, String, String, String, String, String, boolean)
can be invoked.sName
- The name of the root packagepublic static final JavaSrcTreePkg getRootPkg(java.lang.String sName)
sName
- The name of the root packagepublic static final LocalIdents getRootLevelIdents()
public org.vishia.java2C.ClassData runRequestedFirstPass(JavaSrcTreeFile javaSrc, java.lang.String sPkgClassName) throws java.io.FileNotFoundException, java.lang.IllegalArgumentException, java.io.IOException, java.lang.IllegalAccessException, java.lang.InstantiationException, java.text.ParseException
runRequestedFirstPass
in interface RunRequiredFirstPass_ifc
sClassName
- The name of the type in Java. The filename should be the same.
The file is searched in any package given as input parameter calling java2C.Java2C_Main#userTypes
.java.text.ParseException
java.io.FileNotFoundException
java.lang.IllegalArgumentException
java.io.IOException
java.lang.IllegalAccessException
java.lang.InstantiationException
org.vishia.java2C.RunRequiredFirstPass_ifc#runRequestedFirstPass(java.lang.String)