1

I want to move an inner class from an outer class to another outer class. Is it possible to do it using bcel? For e.g:

class Outer1{
    ---
    class Inner{
     ----
    }
}

will be converted to:

class Outer2{
    ---
    class Inner{
        ----
    }
}

and

class Outer1{
    ----
}

Thanks.

soham
  • 35
  • 6
  • So why can't you just do it manually? – vallentin Aug 10 '13 at 08:30
  • Actually there is a large class pool and i have to do this for each and every class. This is needed as a part of code obfuscation. – soham Aug 11 '13 at 03:01
  • The inner-outer class relationship is just a meta information which does not affect the way the compiled code works. Usually such information is just removed by obfuscators. But it would be easy to swap the classes if you want to irritate decompilers. It’s as easy as swapping two `short` values in the class file. – Holger Jan 08 '14 at 19:19

0 Answers0