use of com.newrelic.agent.instrumentation.context.TraceByReturnTypeMatchVisitor in project newrelic-java-agent by newrelic.
the class TraceByReturnTypeMatchVisitorTest method instrumentClass.
private InstrumentationContext instrumentClass(Class<?> clazz) throws IOException {
InstrumentationContext context = new InstrumentationContext(null, clazz, clazz.getProtectionDomain());
ClassReader reader = new ClassReader(clazz.getName());
ClassVisitor visitor = new TraceByReturnTypeMatchVisitor().newClassMatchVisitor(clazz.getClassLoader(), clazz, reader, new ClassWriter(0), context);
reader.accept(visitor, 0);
return context;
}
Aggregations