From 38af9949c6ffd1b07aaab3271cd57f83ce247286 Mon Sep 17 00:00:00 2001 From: wisberg Date: Fri, 3 Nov 2006 07:47:16 +0000 Subject: to pdguide added XLint list, more control options, debugging pointcuts, and more hand-holding. --- docs/pdGuideDB/ltwdump.xml | 55 ++++++++++++++++++++++------------------------ 1 file changed, 26 insertions(+), 29 deletions(-) (limited to 'docs/pdGuideDB/ltwdump.xml') diff --git a/docs/pdGuideDB/ltwdump.xml b/docs/pdGuideDB/ltwdump.xml index 36b1bea3a..049f2e4f5 100644 --- a/docs/pdGuideDB/ltwdump.xml +++ b/docs/pdGuideDB/ltwdump.xml @@ -1,38 +1,35 @@ - - LTW Dump + + Dumping classes during load-time weaving Introduction - Occasionally problems may be encountered with classes that have been load-time woven. - Symptoms will include incorrect program function or a Java exception such as - java.lang.VerifyError. Problems can be caused by the way - an aspect or class is built, incompatibilities between AspectJ and - generated byte-code - e.g. CGLIB - or a bug in the weaver. - When these problems occur it may be necessary to attach the class files concerned - to a bug report. AspectJ can be configured to dump byte-code to disk using - META-INF/aop.xml. The _ajdump subdirectory the the current - working directory is used. - - - Configuration - - See the + + Very rarely, problems present not at build-time but at run-time, + with java.lang.VerifyError or incorrect behavior. + In these situations, it's most helpful to include the offending class + in the bug report. But with load-time weaving, the woven classes are + in memory only; to save classes woven at load-time, configure + META-INF/aop.xml to dump the classes (by default + to an _ajdump subdirectory of the current working + directory). Also, if the input class file is not available (e.g., if + the AspectJ weaver is after another bytecode weaver), you can + also configure the weaver to dump the input classes. + + + Configuring bytecode dumping in load-time weaving + + For details of how to configure byte-code dumping, see the + AspectJ Development Environment Guide section on - Development Environment Guide - for details of how to configure byte-code dumping. - + Configuring Load-time Weaving. + Following is a simple example. + + - - Examples - - By default AspectJ will dump byte-code only after it is woven. This - is because usually the original class file is already available. However - byte-code is sometimes generated by frameworks or downloaded over the network - in which case AsepctJ can dump the byte-code before it is woven too. - + + LTW Dump Examples + The following META-INF/aop.xml will weave classes in the com.foo package (and subpackages) but not CGLIB generated classes in the com.foo.bar package (and subpackages). -- cgit v1.2.3