*/
protected void processMethodAnnotations(AbstractClassMetaData cmd, Method method)
{
Annotation[] annotations = method.getAnnotations();
EventListenerMetaData elmd = cmd.getListenerForClass(cmd.getFullClassName());
if (elmd == null)
{
elmd = new EventListenerMetaData(cmd.getFullClassName());
cmd.addListener(elmd);
}
if (annotations != null)
{
for (int i=0; i<annotations.length; i++)
{
String annotationTypeName = annotations[i].annotationType().getName();
if (annotationTypeName.equals(PrePersist.class.getName()) ||
annotationTypeName.equals(PostPersist.class.getName()) ||
annotationTypeName.equals(PreRemove.class.getName()) ||
annotationTypeName.equals(PostRemove.class.getName()) ||
annotationTypeName.equals(PreUpdate.class.getName()) ||
annotationTypeName.equals(PostUpdate.class.getName()) ||
annotationTypeName.equals(PostLoad.class.getName()))
{
elmd.addCallback(annotationTypeName, method.getDeclaringClass().getName(), method.getName());
}
}
}
}