All Downloads are FREE. Search and download functionalities are using the official Maven repository.

aj.org.objectweb.asm.commons.package.html Maven / Gradle / Ivy

Go to download

AspectJ tools most notably contains the AspectJ compiler (AJC). AJC applies aspects to Java classes during compilation, fully replacing Javac for plain Java classes and also compiling native AspectJ or annotation-based @AspectJ syntax. Furthermore, AJC can weave aspects into existing class files in a post-compile binary weaving step. This library is a superset of AspectJ weaver and hence also of AspectJ runtime.

There is a newer version: 1.9.22.1
Show newest version




  Package org.objectweb.asm.commons


Provides some useful class and method adapters. The preferred way of using
these adapters is by chaining them together and to custom adapters (instead of
inheriting from them). Indeed this approach provides more combination
possibilities than inheritance. For instance, suppose you want to implement an
adapter MyAdapter than needs sorted local variables and intermediate stack map
frame values taking into account the local variables sort. By using inheritance,
this would require MyAdapter to extend AnalyzerAdapter, itself extending
LocalVariablesSorter. But AnalyzerAdapter is not a subclass of
LocalVariablesSorter, so this is not possible. On the contrary, by using
delegation, you can make LocalVariablesSorter delegate to AnalyzerAdapter,
itself delegating to MyAdapter. In this case AnalyzerAdapter computes
intermediate frames based on the output of LocalVariablesSorter, and MyAdapter
can add new locals by calling the newLocal method on LocalVariablesSorter, and
can get the stack map frame state before each instruction by reading the locals
and stack fields in AnalyzerAdapter (this requires references from MyAdapter
back to LocalVariablesSorter and AnalyzerAdapter).





© 2015 - 2024 Weber Informatics LLC | Privacy Policy