org.vishia.java2C
Class ClassData.InheritanceInfo

java.lang.Object
  extended by org.vishia.java2C.ClassData.InheritanceInfo
Enclosing class:
ClassData

static class ClassData.InheritanceInfo
extends java.lang.Object

Holds Informations about superclasses and interfaces.


Field Summary
(package private)  ClassData classData
          The ClassData associated to this node of inheritance information.
private  ClassData.InheritanceInfo[] ifcInheritance
          All Interfaces of the current classData.
private  ClassData.MethodOverrideable[] methodTable
          Array of all methods of this inheritance level of ClassData with methods, which are able to override and which are overridden.
(package private)  ClassData.InheritanceInfo superInheritance
          The Superclass of the current classData.
 
Constructor Summary
private ClassData.InheritanceInfo(ClassData classDataP, ClassData.InheritanceInfo srcInheritance)
          The constructor for the inner InheritanceInfos, see picture on other constructor.
private ClassData.InheritanceInfo(ClassData classDataP, ClassData superClassP, ClassData[] ifcClassDataP)
          Creates a new instance for a new creating class.
 
Method Summary
(package private)  void stop()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

classData

final ClassData classData
The ClassData associated to this node of inheritance information. The toplevel node of ClassData.inheritanceInfo references the declaring class itself, but the #superClass-referenced instance references the ClassData of the superclass etc.


superInheritance

ClassData.InheritanceInfo superInheritance
The Superclass of the current classData. It isn't a instance of ClassData, but an instance of this classtype, because the names of the overridden methods are different from the Methods named in the parallel list in ClassData.inheritanceInfo of the superclass.


ifcInheritance

private ClassData.InheritanceInfo[] ifcInheritance
All Interfaces of the current classData.


methodTable

private ClassData.MethodOverrideable[] methodTable
Array of all methods of this inheritance level of ClassData with methods, which are able to override and which are overridden. Each element refers the method in its originally representation (associated to the superclass or interface) and its overriding name in this class. The overriding name is the name, which is set to the Mtbl_Type in C.

Constructor Detail

ClassData.InheritanceInfo

private ClassData.InheritanceInfo(ClassData classDataP,
                                  ClassData superClassP,
                                  ClassData[] ifcClassDataP)
Creates a new instance for a new creating class. This constructor is called inside the Constructor of ClassData#ClassData(GenerateFile, String, String, String, String, String, char, ClassData, ClassData, ClassData[], ZbnfParseResultItem, boolean, boolean, boolean, LocalIdents)). The constructor creates the tree of some ClassData.InheritanceInfo and their instances of ClassData.MethodOverrideable. The picture shows that: The tree of ClassData.MethodOverrideable are determined by the source tree of the superclass. To create the inner InheritanceInfo-instances, the ClassData.InheritanceInfo#InheritanceInfo(ClassData, ClassData, ClassData[])-constructor is used. This constructor uses the given source-InheritanceInfo to get the next deeper level. The InheritanceInfo- tree of the superClass contains the correct names of the implementation routines, attribute ClassData.MethodOverrideable.sNameOverriding. But the parallel existing instance referenced from any own class immediately, showing in green but red crossed out doesn't contain the correct implementation names. It contain the implementation name of this class-level. The class is a deeper superclass of the superclass, the methods may be overridden long ago.

Parameters:
classDataP - The creating class. A backward aggregation is set: classData.
superClassP - The superclass of the creating class. The superclass is referenced only here, not in the ClassData. The ClassData.inheritanceInfo of the superclass is the source for all inheritance infos of this class. The picture show the referenced instance of this parameter in yellow on top-right, and the source of all inheritance infos referenced from there in cyan color.
ifcClassDataP - The interfaces of the creating class. The interfaces are referenced only here, not in the ClassData. The all-inheritance-infos of interface tree are got from here, see picture in bottom area.

ClassData.InheritanceInfo

private ClassData.InheritanceInfo(ClassData classDataP,
                                  ClassData.InheritanceInfo srcInheritance)
The constructor for the inner InheritanceInfos, see picture on other constructor.

Parameters:
classDataP - The associated class.
srcInheritance - The InheritanceInfo, but from the tree of the primary super class, but not from classDataP immediately. See picture. It may be null, if the class hasn't any override-able methods.
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

stop

void stop()