commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject svn commit: r1598455 - /commons/proper/weaver/trunk/src/site/markdown/index.md
Date Fri, 30 May 2014 04:18:03 GMT
Author: mbenson
Date: Fri May 30 04:18:02 2014
New Revision: 1598455

URL: http://svn.apache.org/r1598455
Log:
reorder and get rid of an apostrophe so vim doesn't look stupid ;)

Modified:
    commons/proper/weaver/trunk/src/site/markdown/index.md

Modified: commons/proper/weaver/trunk/src/site/markdown/index.md
URL: http://svn.apache.org/viewvc/commons/proper/weaver/trunk/src/site/markdown/index.md?rev=1598455&r1=1598454&r2=1598455&view=diff
==============================================================================
--- commons/proper/weaver/trunk/src/site/markdown/index.md (original)
+++ commons/proper/weaver/trunk/src/site/markdown/index.md Fri May 30 04:18:02 2014
@@ -121,10 +121,25 @@ seen here:
 Multiple weaving targets (e.g. `main` vs. `test`) are of course woven
 using different `settings`.
 
+## Custom Weaver Modules
+As discussed, some modules are provided for common cases, and the developers
+welcome suggestions for useful modules, but there is no reason not to get
+started writing your own weaver module (assuming you are sure this is the right
+solution, or just want to do this for fun) now! When the processor framework
+invokes your custom `Weaver`, it will pass in a `Scanner` that can be used to
+find the classes you are interested in. Request the original bytecode from the
+`WeaveEnvironment` and make your changes (for this task you will save time and
+frustration using one of the available open source Java bytecode manipulation
+libraries). Save your changes back to the `WeaveEnvironment`. Rinse, repeat.
+Hint: if your `Weaver` uses configuration parameters to dictate its
+behavior, it can leave a scannable "footprint" in your woven classes. Then
+implement the `Cleaner` SPI to find and delete these in the case that the
+current configuration is incompatible with the results of an earlier "weaving."
+
 ## Examples
 The canonical example is the [privilizer module](commons-weaver-modules-parent/commons-weaver-privilizer-parent/index.html).
 
-A simple example could be exposing annotated methods for a REST API. Let's suppose 
+A simple example could be exposing annotated methods for a REST API. Suppose 
 you want to expose only classes annotated with @WebExposed to your Web REST API.
 
       package example;
@@ -240,21 +255,6 @@ your custom Weaver. This is done by addi
 If you are using Maven, then creating <code>src/main/resources/META-INF/services/org.apache.commons.weaver.spi.Weaver</code>

 with <pre>example.MyWeaver</pre> will instruct ServiceLoader to load your Weaver
class.
 
-## Custom Weaver Modules
-As discussed, some modules are provided for common cases, and the developers
-welcome suggestions for useful modules, but there is no reason not to get
-started writing your own weaver module (assuming you are sure this is the right
-solution, or just want to do this for fun) now! When the processor framework
-invokes your custom `Weaver`, it will pass in a `Scanner` that can be used to
-find the classes you are interested in. Request the original bytecode from the
-`WeaveEnvironment` and make your changes (for this task you will save time and
-frustration using one of the available open source Java bytecode manipulation
-libraries). Save your changes back to the `WeaveEnvironment`. Rinse, repeat.
-Hint: if your `Weaver` uses configuration parameters to dictate its
-behavior, it can leave a scannable "footprint" in your woven classes. Then
-implement the `Cleaner` SPI to find and delete these in the case that the
-current configuration is incompatible with the results of an earlier "weaving."
-
 ##FAQ
 
 * *Q*: Why not just use [AspectJ](http://eclipse.org/aspectj/)?



Mime
View raw message