Package alt.jiapi.event

Examples of alt.jiapi.event.MethodEventProducer


        InstrumentationDescriptor id = new InstrumentationDescriptor();
        id.addInclusionRule("samples.*");
        ctx.addInstrumentationDescriptor(id);
       
        // Use event API:
        MethodEventProducer eventProducer = new MethodEventProducer(id);
        eventProducer.addMethodListener(this);
       
        Bootstrapper.launch("samples.Foo", null, ctx,
                            InstrumentingClassLoader.createClassLoader(ctx));
    }
View Full Code Here


        InstrumentationDescriptor id = new InstrumentationDescriptor();
        id.addInclusionRule("test.*");
        ctx.addInstrumentationDescriptor(id);
       
        // Use event API:
        MethodEventProducer eventProducer = new MethodEventProducer(id);
        eventProducer.addMethodListener(this);
       
        // Launch:
        Bootstrapper.launch("test.Foo", null, ctx,
                            getClass().getClassLoader());
    }
View Full Code Here

        log.debug("creating the InstrumentationDescriptor");
        InstrumentationContext ctx = new InstrumentationContext();
       
        InstrumentationDescriptor id = new InstrumentationDescriptor();
        id.addInclusionRule("test.callgraph");
        MethodEventProducer eventProducer = new MethodEventProducer(id);
        eventProducer.addMethodListener(monitor);
        ctx.addInstrumentationDescriptor(id);

        log.debug("creating a class loader");
        ClassLoader cl = InstrumentingClassLoader.createClassLoader(ctx);
       
View Full Code Here

        // Events for field access
        FieldEventProducer fieldEventProducer = new FieldEventProducer(id);
        fieldEventProducer.addFieldListener(this);

        // Events for method access
        MethodEventProducer methodEventProducer = new MethodEventProducer(id);
        methodEventProducer.addMethodListener(this);


        //        JiapiClass jc = new Loader().loadClass("samples.event.Foo");

        Bootstrapper.launch("samples.event.Foo", null, ctx,
View Full Code Here

        // Events for field access
        FieldEventProducer fieldEventProducer = new FieldEventProducer(fid);
        fieldEventProducer.addFieldListener(this);

        // Events for method access
        MethodEventProducer methodEventProducer = new MethodEventProducer(mid);
        methodEventProducer.addMethodListener(this);

        // Add field and method descriptors to context
        ctx.addInstrumentationDescriptor(fid);
        ctx.addInstrumentationDescriptor(mid);
View Full Code Here

        ctx.addInstrumentationDescriptor(id);

        addInclusionRules(id, getInclusionRules());
        addExclusionRules(id, getExclusionRules());

        MethodEventProducer mep =
            new MethodEventProducer(id, System.getProperty("resolution", "*"));

//          System.out.println("MEP: " + mep.getClass().getClassLoader());
//          System.out.println("ET: " + getClass().getClassLoader());

        mep.addMethodListener(this);
    }
View Full Code Here

        // Store Descriptor to Context
        ctx.addInstrumentationDescriptor(id);

        // This will provide Instrumentors and Patches needed in this
        // test/sample
        MethodEventProducer mep = new MethodEventProducer(id, resolution);

        // Add MethodEventListner ----
        CallTrace et = new CallTrace();
        mep.addMethodListener(et);

        // The first argument is class name, the rest are String args.
        String [] _args = new String[args.length - 1];
        System.arraycopy(args, 1, _args, 0, _args.length);
        Bootstrapper.launch(args[0], _args, ctx, CallTrace.class.getClassLoader());
View Full Code Here

TOP

Related Classes of alt.jiapi.event.MethodEventProducer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.