use of javax.inject.Named in project AngularBeans by bessemHmidi.
the class CommonUtils method getBeanName.
public static String getBeanName(Class targetClass) {
if (targetClass.isAnnotationPresent(Named.class)) {
Named named = (Named) targetClass.getAnnotation(Named.class);
if (!named.value().isEmpty()) {
return named.value();
}
}
String name = Introspector.decapitalize(targetClass.getSimpleName());
beanNamesHolder.put(name, targetClass);
return name;
}
Aggregations