* @return a String that is used as the name of the component.
*/
public static String getComponentName(Object component) {
Class<?> componentClass = component.getClass();
Name nameAnnotation = componentClass.getAnnotation(Name.class);
if (nameAnnotation != null) {
return nameAnnotation.value();
}
return componentClass.getSimpleName();
}