package com.kiselev.reflection.ui.bytecode.agent;

import com.kiselev.reflection.ui.bytecode.holder.ByteCodeHolder;

import java.lang.instrument.Instrumentation;
import java.util.List;

/**
 * Created by Vadim Kiselev on 6/12/2017.
 */
public class Agent {

    public static void agentmain(String args, Instrumentation instrumentation) {
        try {
            instrumentation.addTransformer(new Transformer(), true);
            Class[] allLoadedClasses = instrumentation.getAllLoadedClasses();

            for (Class loadedClass : allLoadedClasses) {
                if (!loadedClass.isArray()) {
                    instrumentation.retransformClasses(loadedClass);
                }
            }

        } catch (Exception exception) {
            // sin
        }
    }
}

@@ -48,74 +48,8 @@
 t;%0A%0A
-import com.kiselev.reflection.ui.bytecode.holder.ByteCodeHolder;%0A%0A
 impo
@@ -92,31 +92,8 @@
 ion;
-%0Aimport java.util.List;
 %0A%0A/*
@@ -609,17 +609,16 @@
       %7D%0A
-%0A
         

Fix agent class after merging