}
public byte[] visit( byte[] bytes){
//Implementing Phase1 to collect remote Annotated Method Details
DataCollectorAdaptor da = new DataCollectorAdaptor(rmd);
ClassReader cr1 = new ClassReader(bytes);
cr1.accept(da, ClassReader.SKIP_DEBUG);
//Implementing Phase2 to Perform Byte Code Manipulation
ClassReader cr2 = new ClassReader(bytes);
cr2.accept((ClassTransformer)this, ClassReader.EXPAND_FRAMES);
//Test & Print the newly implemented class, only if print requested
String print = System.getProperty("bytecodePrint", "false");
if(Boolean.parseBoolean(print)){
ClassReader cr3 = new ClassReader(((ClassWriter)cv).toByteArray());
ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_MAXS);
PrintWriter writer = new PrintWriter(System.out);
CheckClassAdapter cv = new CheckClassAdapter(cw);
TraceClassVisitor tcv = new TraceClassVisitor(cv, writer );
cr3.accept(tcv, ClassReader.EXPAND_FRAMES);
byte[] newFile = cw.toByteArray();
return newFile;
}
return ((ClassWriter)super.cv).toByteArray();