|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.aspectwerkz.transform.AspectWerkzPreProcessor
public class AspectWerkzPreProcessor
AspectWerkzPreProcessor is the entry point of the AspectWerkz layer 2.
It implements the ClassPreProcessor interface defined in layer 1. Available options are:-Daspectwerkz.transform.verbose=yes
turns on verbose mode: print on stdout all non filtered class
names and which transformation are applied-Daspectwerkz.transform.dump=org.myapp.*
dumps transformed class matching pattern org.myapp.*
(even unmodified ones) in ./_dump directory (relative to where applications starts). The syntax
-Daspectwerkz.transform.dump=*
matchs all classes. The pattern language is the same as pointcut
pattern language.-Daspectwerkz.transform.dump=org.myapp.*,before
dumps class before and after the
transformation whose name starts with org.myapp. (even unmodified ones) in ./_dump/before and
./_dump/after directories (relative to where application starts)-Daspectwerkz.transform.filter=no
(or false) disables filtering of
org.codehaus.aspectwerkz
and related classes (trove, dom4j etc.). This should only be used in offline
mode where weaving of those classes is needed. Setting this option in online mode will lead to
ClassCircularityError
.
Nested Class Summary | |
---|---|
static class |
AspectWerkzPreProcessor.Output
Structure build when invoking tool weaving |
Field Summary | |
---|---|
static boolean |
DETAILS
|
static boolean |
GENJP
|
static boolean |
VERBOSE
|
Constructor Summary | |
---|---|
AspectWerkzPreProcessor()
|
Method Summary | |
---|---|
Context |
_preProcess(String className,
byte[] bytecode,
ClassLoader loader)
Weaving of the class |
static void |
dumpAfter(String className,
Context context)
Dumps class after weaving. |
static void |
dumpBefore(String className,
Context context)
Dumps class before weaving. |
void |
initialize()
Initializes the transformer stack. |
static void |
log(String msg)
Logs a message. |
byte[] |
preProcess(String name,
byte[] bytecode,
ClassLoader loader)
Transform bytecode according to the transformer stack Adapted for embedded modes, that will filter out framework classes See preProcessWithOutput for a tool entry point. |
AspectWerkzPreProcessor.Output |
preProcessWithOutput(String name,
byte[] bytecode,
ClassLoader loader)
Weaving without filtering any class and returning a rich object with emitted joinpoints |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final boolean VERBOSE
public static final boolean DETAILS
public static final boolean GENJP
Constructor Detail |
---|
public AspectWerkzPreProcessor()
Method Detail |
---|
public void initialize()
initialize
in interface ClassPreProcessor
public byte[] preProcess(String name, byte[] bytecode, ClassLoader loader)
preProcess
in interface ClassPreProcessor
name
- class namebytecode
- bytecode to transformloader
- classloader loading the class
public Context _preProcess(String className, byte[] bytecode, ClassLoader loader)
className
- bytecode
- loader
-
public AspectWerkzPreProcessor.Output preProcessWithOutput(String name, byte[] bytecode, ClassLoader loader)
name
- bytecode
- loader
-
public static void log(String msg)
msg
- the message to logpublic static void dumpBefore(String className, Context context)
className
- context
- public static void dumpAfter(String className, Context context)
className
- context
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |