@ Requires ( "bytecode != null" ) @ Ensures ( "result != null" ) private byte [ ] instrumentWithDebug ( byte [ ] bytecode ) { ClassReader reader = new ClassReader ( bytecode ) ; ClassWriter writer = new NonLoadingClassWriter ( reader , 0 ) ; reader . accept ( new HelperClassAdapter ( writer ) , ClassReader . EXPAND_FRAMES ) ; return writer . toByteArray ( ) ; }
Instruments the passed class file so that it contains debug information extraction from annotations .