0

iam planning to develope one application, which will take java byte code or class diagram or metamodel as an input and produces the source code according to package structure. But i need some suggestions like,

How to start this application, mean do there any api that convert the metamodel or byte code to source code.

developer
  • 9,116
  • 29
  • 91
  • 150

2 Answers2

1

You can check with Jdec framework in that case.It is doing the following functionality:

  • Selective Decompilation of a class file

  • Disassembling a java class

It is open source. http://jdec.sourceforge.net/

I think it might be a good start.

UVM
  • 9,776
  • 6
  • 41
  • 66
  • +1 thanks for your suggestion, its a starting step. Also iam looking for more suggestions to select very apt to my implementation. – developer May 25 '12 at 05:12
  • If that is the case, read this article: http://www.sable.mcgill.ca/publications/papers/2006-3/nanaeem-icpc06.pdf – UVM May 25 '12 at 05:17
  • oh its blocking in my office, i will check it in home. Thanks Mana – developer May 25 '12 at 05:26
0

Not sure if BCEL is what you are looking for but it's worth taking a look.
When I personally need to decompile some java bytecode I'm using JAD.
Also when you're looking for an general introduction to java bytecode for an better understanding try the two links in the comments (I'm restricted to two links per answer so I apologize the inconvenience).

EKrueger
  • 730
  • 8
  • 20
  • [IBM developer works](http://www.ibm.com/developerworks/ibm/library/it-haggar_bytecode/) – EKrueger May 25 '12 at 09:53
  • [Java bytecode fundamentals](http://arhipov.blogspot.de/2011/01/java-bytecode-fundamentals.html) - a more current blog post – EKrueger May 25 '12 at 09:53