|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.vishia.java2C.JavaSrcTreeFile
public class JavaSrcTreeFile
Representation of an existing Java file.
| Field Summary | |
|---|---|
private boolean |
bToTranslateToC
True if this file is to be translate. |
(package private) ClassData |
classData
If set, the file is translated, the classData presents its content for foreign use. |
private java.io.File |
fileJava
|
private JavaSrcTreePkg |
itsPkg
|
private ConfigSrcPathPkg_ifc.Set |
replaceCinfo
informations to find out where the C-file is found and which pre/suffix are valid. |
private java.lang.String |
sFileName
|
private java.lang.String |
sFilePathC
|
private java.lang.String |
sJavaSrcPath
|
private java.lang.String |
sPrefixClassNameC
Pre- and Suffixes to build the class name in C additional to the java-name of classes. |
private java.lang.String |
sPublicClassName
The name of the public class of this file. |
private java.lang.String |
sStcPath
|
private java.lang.String |
sSuffixClassNameC
Pre- and Suffixes to build the class name in C additional to the java-name of classes. |
| Constructor Summary | |
|---|---|
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. |
|
| Method Summary | |
|---|---|
java.lang.String |
getClassCNamePrefix()
|
java.lang.String |
getClassCNameSuffix()
|
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()
Implements JavaSources.ClassDataOrJavaSrcFile.getJavaPkg() |
JavaSrcTreeFile |
getJavaSrc()
returns the instance because it is. |
private java.lang.String |
getJavaSrcPathInfo()
Returns the source path where the file is found. |
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()
Implements JavaSources.ClassDataOrJavaSrcFile.getTypeName() |
(package private) void |
infoSecondFile(java.io.File fileJava,
boolean shouldTranslated)
|
boolean |
isToTranslate()
Returns true if the translation from Java is set. |
boolean |
isTranslated()
|
void |
setClassData(ClassData data)
|
void |
setToTranslate(java.io.File fileJava)
|
java.lang.String |
toString()
|
LocalIdents |
xxxgetLocalIdents()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private final java.lang.String sFileName
private final java.lang.String sPublicClassName
private final java.lang.String sJavaSrcPath
private final java.lang.String sPrefixClassNameC
private final java.lang.String sSuffixClassNameC
private final java.lang.String sStcPath
private final java.lang.String sFilePathC
private final JavaSrcTreePkg itsPkg
private java.io.File fileJava
private boolean bToTranslateToC
private final ConfigSrcPathPkg_ifc.Set replaceCinfo
ClassData classData
| Constructor Detail |
|---|
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 - 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.| Method Detail |
|---|
public 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()
void infoSecondFile(java.io.File fileJava,
boolean shouldTranslated)
fileJava - public java.lang.String getStcPath()
public java.lang.String getPublicClassName()
public LocalIdents getPkgLevelTypes()
public java.lang.String getFileNameC()
private java.lang.String getJavaSrcPathInfo()
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(ClassData data)
setClassData in interface JavaSources.ClassDataOrJavaSrcFilepublic boolean isToTranslate()
JavaSources.ClassDataOrJavaSrcFile
isToTranslate 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()
JavaSources.ClassDataOrJavaSrcFile.getJavaPkg()
getJavaPkg in interface JavaSources.ClassDataOrJavaSrcFilepublic java.lang.String getTypeName()
JavaSources.ClassDataOrJavaSrcFile.getTypeName()
getTypeName in interface JavaSources.ClassDataOrJavaSrcFilepublic ConfigSrcPathPkg_ifc.Set getReplaceCinfo()
JavaSources.ClassDataOrJavaSrcFile
getReplaceCinfo in interface JavaSources.ClassDataOrJavaSrcFile
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||