private void addImplementDescriptor(ClassDescriptor classDescriptor, Class clazz)
{
Class[] interfaces = ReflectionUtils.getInterfaces(clazz);
for (int i = 0; i < interfaces.length; i++) {
ImplementDescriptor implementDescriptor = new ImplementDescriptor();
implementDescriptor.setInterfaceName(interfaces[i].getName());
classDescriptor.addImplementDescriptor(implementDescriptor);
}
// TODO : Can we still support the annotation @Implement if we are using
// the reflection to get the list of the interfaces ?
Implement implementAnnotation = (Implement) clazz.getAnnotation(Implement.class);
if (implementAnnotation != null)
{
ImplementDescriptor implementDescriptor = new ImplementDescriptor();
implementDescriptor.setInterfaceName(implementAnnotation.interfaceName().getName());
classDescriptor.addImplementDescriptor(implementDescriptor);
}
}