Load-time Weaving Requirements
All load-time weaving is done in the context of a class loader, and hence the set of
aspects used for weaving and the types that can be woven are affected by the class
loader delegation model. This ensures that LTW complies with the Java 2 security model.
The following rules govern the interaction of load-time weaving with class loading:
- All aspects to be used for weaving must be defined to the weaver before any
types to be woven are loaded.
- All abstract and concrete aspects visible to the weaver
are available for extending (abstract aspects) and using for weaving.
A visible aspect is one defined by the
weaving class loader or one of its parent class loaders.
- A class loader may only weave classes that it defines. It may not weave
classes loaded by a delegate or parent class loader.