while (e.hasMoreElements ())
{
SymtabEntry contained = (SymtabEntry)e.nextElement ();
if (contained instanceof MethodEntry)
{
MethodEntry element = (MethodEntry)contained;
((MethodGen)element.generator ()).interfaceMethod (symbolTable, element, stream);
}
else
{
// Generate the type referenced by the typedef.
if (contained instanceof TypedefEntry)
contained.type ().generate (symbolTable, stream);
// Note that we also need to generate the typedef itself if
// contained is a typedef.
contained.generate (symbolTable, stream);
}
}
// Abstract values are mapped to interfaces. There is no need to generate
// the bindings for inheriting methods in case of inheritance from other
// abstract values or supporting interface
if (v.isAbstract ())
return;
// workaround: if the value type doesnot support any interfaces, a null
// return is expected instead of an empty vector
// if supporting an interfaces, generate bindings for inheriting methods
if (v.supports ().size () > 0)
{
InterfaceEntry intf = (InterfaceEntry) v.supports ().elementAt (0);
Enumeration el = intf.allMethods ().elements ();
while (el.hasMoreElements ())
{
MethodEntry m = (MethodEntry) el.nextElement ();
// <d59071> Don't alter the symbol table/emit list elements!
//m.container (v);
//((MethodGen)m.generator ()).interfaceMethod (symbolTable, m, stream);
MethodEntry mClone = (MethodEntry)m.clone ();
mClone.container (v);
((MethodGen)mClone.generator ()).interfaceMethod (symbolTable, mClone, stream);
}
}
// if inheriting from abstract values, generating bindings for all
// inheriting methods
for (int i = 0; i < v.derivedFrom ().size (); i++) {
ValueEntry parentValue = (ValueEntry) v.derivedFrom ().elementAt (i);
if (parentValue.isAbstract ())
{
Enumeration el = parentValue.allMethods ().elements ();
while (el.hasMoreElements ())
{
MethodEntry m = (MethodEntry) el.nextElement ();
// <d59071> Don't alter the symbol table/emit list elements!
//m.container (v);
//((MethodGen)m.generator ()).interfaceMethod (symbolTable, m, stream);
MethodEntry mClone = (MethodEntry)m.clone ();
mClone.container (v);
((MethodGen)mClone.generator ()).interfaceMethod (symbolTable, mClone, stream);
}
}
}
//writeStreamableMethods ();