We developed a model generator tool that get a �base model� as an input and generated rich model. The �base model� is collection of POJO classes and the model generator analyzed the base model (with reflection) and with �ftl� generates �rich model� , which is the base model with additional annotations and logics.
Some classes in the �base-model� may contain additional method and I need to copy those methods as they are to the �rich-model� generated sources.
I need a way to copy those methods from the base-model (I work on it with reflection, but I have also the source) to the rich-model.
I think to do this by decompile. Are there any better way? Is there any simple utility that decompile method?
posted 8 years ago
If I were in that situation, I'd probably evaluate whether I could make use of the Decorator design pattern instead. That is, let the newly generated classes delegate to the original classes were appropriate.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus