public final class ASMTransformerFactory extends Object implements DCRWeaver.ClassFileTransformerFactory
DCRWeaver.ClassFileTransformerFactory
implementation that uses ASM to
advise methods.Constructor and Description |
---|
ASMTransformerFactory(Class<?> adviceClass)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
ClassFileTransformer |
create(net.grinder.util.weave.j2se6.PointCutRegistry pointCutRegistry)
Factory method.
|
public ASMTransformerFactory(Class<?> adviceClass) throws WeavingException
We can't add fields to the class due to DCR limitations, so we have to wire
in the advice class using static methods.adviceClass
should
implement two methods with the following names and signatures.
public static void enter(Object reference, String location); public static void exit(Object reference, String location, boolean success);
adviceClass
- Class that provides the advice.WeavingException
- If adviceClass
does not implement enter
and
exit
static methods.public ClassFileTransformer create(net.grinder.util.weave.j2se6.PointCutRegistry pointCutRegistry)
create
in interface DCRWeaver.ClassFileTransformerFactory
pointCutRegistry
- The point cut registry.Copyright © 2000-2014. All Rights Reserved.