|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.vishia.java2C.JavaSrcTreePkg
public class JavaSrcTreePkg
Representation of an existing Folder in the Java pkg tree.
| Field Summary | |
|---|---|
private java.util.List<JavaSources.ClassDataOrJavaSrcFile> |
javaPublicClasses
Same content as #javaFiles, but the key is the class name. |
private JavaSrcTreePkg |
parent
The parent pkg, it is only to see in debug and reports. |
private boolean |
pkgHasFiles
Set to true if #setFileJava(String, File, String, String, String, boolean)
is called the first time. |
private LocalIdents |
pkgIdents
Index of all sub-packages and classes available in the package, package privates too. |
private ConfigSrcPathPkg_ifc.Set |
replaceCinfo
If this info is found, a stc-file is determined for the package to replace structure info instead given Java-files. |
private java.lang.String |
sPkgName
|
private java.lang.String |
sPkgPath
|
private java.util.TreeMap<java.lang.String,JavaSrcTreePkg> |
subPkgs
|
private java.util.TreeMap<java.lang.String,JavaSrcTreeFile> |
XXXjavaFiles
All file.java containing in this package. |
| Constructor Summary | |
|---|---|
JavaSrcTreePkg(JavaSrcTreePkg parent,
java.lang.String pkgPath,
java.lang.String pkgName,
ConfigSrcPathPkg_ifc.Set replaceCinfo)
|
|
| Method Summary | |
|---|---|
JavaSrcTreePkg |
getChild(java.lang.String key)
Searches the first child with given key from the given node this. |
ClassData |
getClassData()
Returns the ClassData of the instance, or null. |
JavaSrcTreePkg |
getJavaPkg()
Implements JavaSources.ClassDataOrJavaSrcFile.getJavaPkg() |
JavaSrcTreeFile |
getJavaSrc()
Implements JavaSources.ClassDataOrJavaSrcFile.getJavaSrc() |
LocalIdents |
getLocalIdents(java.lang.String sPkgName)
Returns the identifier of classes or packages, which are available in this package. |
JavaSrcTreePkg |
getOrAddPkg(java.lang.String pkgPath,
java.lang.String pkgName,
ConfigSrcPathPkg_ifc.Set replaceCinfo)
returns the Instance, which represents the given package name. |
LocalIdents |
getPkgLevelIdents()
gets the pkg-level-idents. |
java.lang.String |
getPkgPath()
|
java.util.List<JavaSources.ClassDataOrJavaSrcFile> |
getPublicClasses()
|
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 |
getTypeName()
Implements JavaSources.ClassDataOrJavaSrcFile.getTypeName() |
boolean |
isToTranslate()
returns false because a package isn't to translate. |
java.util.Iterator<JavaSrcTreePkg> |
iterChildren()
Returns an iterator through the list of all children of the node. |
java.util.Iterator<JavaSrcTreePkg> |
iterChildren(java.lang.String key)
Returns an iterator through the list of all children with the given key. |
java.util.List<JavaSrcTreePkg> |
listChildren()
Returns a List of all children of the node. |
java.util.List<JavaSrcTreePkg> |
listChildren(java.lang.String key)
Returns a List of all children with the given key. |
void |
putClassType(ClassData data)
Adds the given type info to the pkgIdents. |
void |
reportClasses(Report report)
|
void |
setClassData(ClassData data)
|
JavaSources.ClassDataOrJavaSrcFile |
setFileJava(java.lang.String javaSrcPath,
java.io.File fileJava,
java.lang.String sFileNameJava,
ConfigSrcPathPkg_ifc.Set info,
java.lang.String prefixCFile,
java.lang.String suffixCFile,
java.lang.String prefixNames,
java.lang.String suffixNames,
java.lang.String stcPath,
boolean translateToC)
Registers the first occurrence of a found Java file or set the ConfigSrcPathPkg_ifc.Set
for an existing file without replaceCinfo |
java.lang.String |
toString()
|
void |
xxxaddStdTypes(LocalIdents types)
Adds all standard types to the package. |
java.util.TreeMap<java.lang.String,JavaSrcTreeFile> |
XXXgetJavaFiles()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private final java.lang.String sPkgPath
private final java.lang.String sPkgName
private final JavaSrcTreePkg parent
private java.util.TreeMap<java.lang.String,JavaSrcTreePkg> subPkgs
private final java.util.TreeMap<java.lang.String,JavaSrcTreeFile> XXXjavaFiles
private final java.util.List<JavaSources.ClassDataOrJavaSrcFile> javaPublicClasses
#javaFiles, but the key is the class name.
private boolean pkgHasFiles
#setFileJava(String, File, String, String, String, boolean)
is called the first time.
private ConfigSrcPathPkg_ifc.Set replaceCinfo
private final LocalIdents pkgIdents
LocalIdents.typeIdents is used, because a package has no fields.
But the type LocalIndents is necessary to implement
the method JavaSources.ClassDataOrJavaSrcFile.getLocalIdents(String)
to support getting data to an identifier inside the package (may be sub-package or a file or a class known in package).
| Constructor Detail |
|---|
public JavaSrcTreePkg(JavaSrcTreePkg parent,
java.lang.String pkgPath,
java.lang.String pkgName,
ConfigSrcPathPkg_ifc.Set replaceCinfo)
pkgIdent - javaSrcPath - | Method Detail |
|---|
public JavaSrcTreePkg getOrAddPkg(java.lang.String pkgPath,
java.lang.String pkgName,
ConfigSrcPathPkg_ifc.Set replaceCinfo)
replaceCinfo is null,
then the given parameter replaceCinfo is used to set it.
If the replaceCinfo was given before, and the parameter replaceCinfo is given here too,
it is tested whether it contains the same. Elsewhere a IllegalArgumentException is thrown.
pkgPath - The full path from rootpkgName - The name of the new packagereplaceCinfo - if not null, then it is the info to build the C-files /search the stc-file
for all non-existing, but needed Java-files of the package.
public void putClassType(ClassData data)
data - The type info.public java.lang.String getPkgPath()
public final java.util.TreeMap<java.lang.String,JavaSrcTreeFile> XXXgetJavaFiles()
public final java.util.List<JavaSources.ClassDataOrJavaSrcFile> getPublicClasses()
public void xxxaddStdTypes(LocalIdents types)
types -
public JavaSources.ClassDataOrJavaSrcFile setFileJava(java.lang.String javaSrcPath,
java.io.File fileJava,
java.lang.String sFileNameJava,
ConfigSrcPathPkg_ifc.Set info,
java.lang.String prefixCFile,
java.lang.String suffixCFile,
java.lang.String prefixNames,
java.lang.String suffixNames,
java.lang.String stcPath,
boolean translateToC)
ConfigSrcPathPkg_ifc.Set
for an existing file without replaceCinfo
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 "".suffixCFile - The suffix to build the C class name and the C file name.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 void reportClasses(Report report)
public JavaSrcTreePkg getChild(java.lang.String key)
SortedTree
getChild in interface SortedTree<JavaSrcTreePkg>key - The key of the demanded child. The implementation may have extra possibilities in addressing children
with strings. The sKey can be representing more as a simple string as a attribute in children.
It may be comparable with the ability of XPATH in XML.
But it will be a feature of Implementation and is not defined as a basic feature of this interface.
public LocalIdents getPkgLevelIdents()
public java.util.Iterator<JavaSrcTreePkg> iterChildren()
SortedTree
iterChildren in interface SortedTree<JavaSrcTreePkg>public java.util.Iterator<JavaSrcTreePkg> iterChildren(java.lang.String key)
SortedTree
iterChildren in interface SortedTree<JavaSrcTreePkg>key - The key of the demanded child. The implementation may have extra possibilities, see getChild(String).
public java.util.List<JavaSrcTreePkg> listChildren()
SortedTree
listChildren in interface SortedTree<JavaSrcTreePkg>public java.util.List<JavaSrcTreePkg> listChildren(java.lang.String key)
SortedTree
listChildren in interface SortedTree<JavaSrcTreePkg>key - The key of the demanded child. The implementation may have extra possibilities, see getChild(String).
public ClassData getClassData()
JavaSources.ClassDataOrJavaSrcFilenull. If the instance is of type ClassData,
it returns the instance itself. If the instance is of type JavaSrcTreeFile, it returns
the associated ClassData, if the file is translated yet or the stc-file is read already.
If the file isn't translated, it returns null.
getClassData in interface JavaSources.ClassDataOrJavaSrcFilepublic JavaSrcTreeFile getJavaSrc()
JavaSources.ClassDataOrJavaSrcFile.getJavaSrc()
getJavaSrc in interface JavaSources.ClassDataOrJavaSrcFilepublic JavaSrcTreePkg getJavaPkg()
JavaSources.ClassDataOrJavaSrcFile.getJavaPkg()
getJavaPkg in interface JavaSources.ClassDataOrJavaSrcFilepublic LocalIdents getLocalIdents(java.lang.String sPkgName)
JavaSources.ClassDataOrJavaSrcFile.getLocalIdents(java.lang.String)
getLocalIdents in interface JavaSources.ClassDataOrJavaSrcFilesPkgName: - It is ignored.
public java.lang.String getTypeName()
JavaSources.ClassDataOrJavaSrcFile.getTypeName()
getTypeName in interface JavaSources.ClassDataOrJavaSrcFilepublic java.lang.String toString()
toString in class java.lang.Objectpublic ConfigSrcPathPkg_ifc.Set getReplaceCinfo()
JavaSources.ClassDataOrJavaSrcFile
getReplaceCinfo in interface JavaSources.ClassDataOrJavaSrcFilepublic boolean isToTranslate()
isToTranslate in interface JavaSources.ClassDataOrJavaSrcFileJavaSources.ClassDataOrJavaSrcFile.isToTranslate()public void setClassData(ClassData data)
setClassData in interface JavaSources.ClassDataOrJavaSrcFile
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||