Creates aspect instances.
This interface must be implemented by all aspect factories. Declare aspect factories instead of the real aspect class when you want:
- to perform some specific action during aspect instance creation (like some initialization that could not be performed by the aspect constructor, for example);
- to create instances of different classes, according to the context where the aspect will be invoked.
- or to do anything else that could not be done without implementing a factory;
This interface provides different methods. However, only the one(s) correspondent to the {@link Scope} of the aspect will be called. Hence, when writing an aspectfactory whose scope is known (and is not intended to change), the implemention of the other methods can be empty. However, we advise throwing a runtime exception from those methods instead of simply returning {@code null}, to alert for unpredicted scenarios in case the {@code Scope} value is not the expected.
@author Bill Burke
@version $Revision: 68585 $