/**
* Store lifecycle metadata.
*/
private void storeCallbacks(ClassMetaData cls) {
LifecycleMetaData meta = cls.getLifecycleMetaData();
Class<?> supCls = cls.getDescribedType().getSuperclass();
Collection<LifecycleCallbacks>[] supCalls = null;
if (!Object.class.equals(supCls)) {
supCalls = AnnotationPersistenceMetaDataParser.parseCallbackMethods
(supCls, null, true, false, _repos);
}
if (supCalls != null) {
for (int event : LifecycleEvent.ALL_EVENTS) {
if (supCalls[event] == null)
continue;
meta.setNonPCSuperclassCallbacks(event, supCalls[event].toArray
(new LifecycleCallbacks[supCalls[event].size()]), 0);
}
}
if (_callbacks == null)
return;
for (int event : LifecycleEvent.ALL_EVENTS) {
if (_callbacks[event] == null)
continue;
meta.setDeclaredCallbacks(event, (LifecycleCallbacks[])
_callbacks[event].toArray
(new LifecycleCallbacks[_callbacks[event].size()]),
_highs[event]);
}
_callbacks = null;