# encoding: utf-8 """ Docstring for java2code """ from java.loader import Loader __author__ = 'Raphael.Marvie@lifl.fr' __date__ = '2007-11-12' # chargement du modele java repository = Loader().load('jobserver.xmi') # production du code for c in repository.Class: print 'class', c.name, '{' for a in c.attributes: print ' private', a.type, a.name, ';' for m in c.methods: print ' public', m.return_type, m.name, '(', for a in m.arguments: print a.type, a.name, if m.arguments[-1] != a: print ",", print '){}' print '}' # eof