I don't see in the current ClassAdapter or ClassAdapterFactory interfaces how it receives annotation overrides.
Does the getInstanceAdapter get called if there are annotation overrides?
Yes, The intention is that if the user of ClassAdapter wants to override at the
instance level it will do the following:
// Get a class level adapter (one per class) and its info
ClassAdapter classLevelAdapter = classAdapterFactory(myClass);
ClassInfo classLevelInfo = classLevelAdapter.getClassInfo();
// Override annotations (if required) and get an instance adapter
ClassInfo overrideInfo = (ClassInfo) classLevelInfo.clone();
ClassAdapter instanceAdapter = classLevelAdapter.getInstanceAdapter(overrideInfo);
// After class can be loaded (this might be what forces the actual class load)
JoinpointFactory jpf = instanceAdapter (or classLevelAdapter).getJoinPointFactory();
If it is not clear in the javadoc of ClassAdapter, please fix it.
If you want to change it, please feel free. We discussed the classes
and how they fit in the scheme, but we didn't discuss the exact methods
a client uses to get an instance adapter with overridden annotations.
This seemed like the most logical solution to me?