First signs of Java support in codegen

These XSLT Templates for simple Java interfaces and classes are the first clear signs that I’m really planning to some day support non .NET languages including Java, Perl, Python, C (GObject), C++ on codegen.

I’m working on it. You can help me (search for pvanhoof on the popular community IRC networks). Especially if you think that at this moment it sucks: I’m working on it. And you can help me. Okay?!

Oh, update. And I finally updated the UML class diagram.

Feature list and more OO support for codegen

I wrote a short feature and planned list about codegen.

Our Subversion repository is back up, so you can start updating your checkout. I’d like to iterate that my company isn’t the copyright owner. I might have scared people away by putting the code on that specific repository. I’m the copyright owner and yes, the project is fully LGPL licensed (and I’m not requiring copyright ownership reassignment).

I also added support for discovering which packages a class depends on. It can be used to create the “using”, “#include or “imports” many programming languages utilise (the generator always uses the package name as default namespace). If you’re target is .NET, the NETSupport.Fixer will also search for .NET standard packages and namespaces to depend your class/interface code on (so that you can
generate the project files and using clausules correctly. The default XSLT Template has some support for this as a sample).

On top of that I added support for abstract classes and abstract attributes and operations. They’ll remain abstract if the class is abstract. But a class that ain’t abstract cannot have abstract attributes nor operations upon generation (of course). Codegen now checks for that. I also added support for discovery for the need of the overrides code attribute.

If you check the default XSLT Template for generating a class, you’ll see that now there’s support for inheritance, implementing interfaces, abstract classes, abstract operations and typed attributes, private, public and protected (for the class, operations and typed attributes), typed operation parameters, namespaces and package dependencies. I’ve tested these XSLT Templates and so far haven’t succeeded in letting it generate a class or interface that didn’t compile. Unless I start using wierd and/or unexisting type names for the attributes, operations or parameters. If I’m still missing something: let me know. Also check the feature list for more information.

I’m going to start creating a XSLT Template set for PHP 5, Python classes and Java soon. If people want to help me with that, get in touch.