This is my first question so please be gentle. :-) I know AspectJ can create pointcuts on static initializers of java classes. But the question is whether a static initializer in an aspect, as below, is guaranteed to be called exactly once:
@Aspect
public class MyAspect {
private static Map configuration;
static {
// Some initialization stuff
configuration = Config.getConfiguration();
}
... use the "configuration" map in pointcuts and advices
}
In other words, is an aspect loaded like a java class is loaded? Is this done via a ClassLoader? I am guessing yes - and it seems to work - but I am looking for a guarantee along those lines.