public class JavaSrcTreeFile extends java.lang.Object implements JavaSources.ClassDataOrJavaSrcFile
| Constructor and Description |
|---|
JavaSrcTreeFile(JavaSrcTreePkg itsPkg,
java.lang.String javaSrcPath,
java.io.File fileJava,
java.lang.String sFileNameJava,
ConfigSrcPathPkg_ifc.Set info,
java.lang.String stcPath,
boolean translateToC)
Initializes the instance.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getClassCNamePrefix() |
java.lang.String |
getClassCNameSuffix() |
org.vishia.java2C.ClassData |
getClassData()
returns
nullif the file is not translated, returns the ClassData if it is translated. |
java.io.File |
getFileJava() |
java.lang.String |
getFileNameC() |
JavaSrcTreePkg |
getJavaPkg()
|
JavaSrcTreeFile |
getJavaSrc()
returns the instance because it is.
|
LocalIdents |
getLocalIdents(java.lang.String sClassName)
Gets the local idents of the givenclass of the file.
|
LocalIdents |
getPkgLevelTypes() |
java.lang.String |
getPkgPath() |
java.lang.String |
getPublicClassName() |
ConfigSrcPathPkg_ifc.Set |
getReplaceCinfo()
Returns the informations to find out where the C-file is found and which pre/suffix are valid.
|
java.lang.String |
getStcPath() |
java.lang.String |
getTypeName()
|
boolean |
isToTranslate()
Returns true if the translation from Java is set.
|
boolean |
isTranslated() |
void |
setClassData(org.vishia.java2C.ClassData data) |
void |
setToTranslate(java.io.File fileJava) |
java.lang.String |
toString() |
LocalIdents |
xxxgetLocalIdents() |
public JavaSrcTreeFile(JavaSrcTreePkg itsPkg, java.lang.String javaSrcPath, java.io.File fileJava, java.lang.String sFileNameJava, ConfigSrcPathPkg_ifc.Set info, java.lang.String stcPath, boolean translateToC)
itsPkg - The package where the file is member of.javaSrcPath - The source path where the file is found first time.fileJava - The File instance ready to open source file.sFileNameJava - The file name without path but with extension .java without directories.prefixCFile - The prefix to build the C class name and the C file name.
The part after the last slash / is the prefix for class names.
The prefix should ended with slash if the file name has no prefix,
but a path to store the to create *.c and *.h files are given.
The prefix may contain "".
struct names for C. No or suffix is necessary than.suffixCFile - The suffix to build the C class name and the C file name.prefixNames - suffixNames - info - information to find out where the C-file is found and which pre/suffix are valid.stcPath - null or a special path where the stc-file is located.translateToC - false than the file should not be translate to C,
instead the stc-file should be used any time. This is if it is a standard class
or a users class, which is located in a library.public org.vishia.java2C.ClassData getClassData()
nullif the file is not translated, returns the ClassData if it is translated.getClassData in interface JavaSources.ClassDataOrJavaSrcFileJavaSources.ClassDataOrJavaSrcFile.getClassData()public JavaSrcTreeFile getJavaSrc()
getJavaSrc in interface JavaSources.ClassDataOrJavaSrcFileJavaSources.ClassDataOrJavaSrcFile.getJavaSrc()public java.lang.String getStcPath()
public java.lang.String getPublicClassName()
public LocalIdents getPkgLevelTypes()
public java.lang.String getFileNameC()
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getPkgPath()
public java.lang.String getClassCNamePrefix()
public java.lang.String getClassCNameSuffix()
public void setClassData(org.vishia.java2C.ClassData data)
setClassData in interface JavaSources.ClassDataOrJavaSrcFilepublic boolean isToTranslate()
JavaSources.ClassDataOrJavaSrcFileisToTranslate in interface JavaSources.ClassDataOrJavaSrcFilepublic void setToTranslate(java.io.File fileJava)
public boolean isTranslated()
public final java.io.File getFileJava()
public LocalIdents xxxgetLocalIdents()
public LocalIdents getLocalIdents(java.lang.String sClassName)
getLocalIdents in interface JavaSources.ClassDataOrJavaSrcFilesClassName - name of the class in file, it may the public class or another one.
implements JavaSources.ClassDataOrJavaSrcFile.getLocalIdents(java.lang.String)public JavaSrcTreePkg getJavaPkg()
getJavaPkg in interface JavaSources.ClassDataOrJavaSrcFilepublic java.lang.String getTypeName()
getTypeName in interface JavaSources.ClassDataOrJavaSrcFilepublic ConfigSrcPathPkg_ifc.Set getReplaceCinfo()
JavaSources.ClassDataOrJavaSrcFilegetReplaceCinfo in interface JavaSources.ClassDataOrJavaSrcFile