/**
* Generates all the code from this type library.
*/
public void generate() throws IOException {
IWTypeLib tlib = lib;
generatePackageHtml();
int len = tlib.count();
// generate event interface first,
// so that we don't generate same interface as invocable ones.
for( int i=0; i<len; i++ ) {
ITypeDecl t = tlib.getType(i);
if(t.getKind()== TypeKind.COCLASS) {
generateEventsFrom( t.queryInterface(ICoClassDecl.class) );
}
}
for( int i=0; i<len; i++ ) {
ITypeDecl t = tlib.getType(i);
switch(t.getKind()) {
case DISPATCH:
generate( t.queryInterface(IDispInterfaceDecl.class) );
break;
case INTERFACE: