Search in sources :

Example 56 with Named

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;
}
Also used : Named(javax.inject.Named)

Aggregations

Named (javax.inject.Named)56 Produces (javax.enterprise.inject.Produces)31 ApplicationScoped (javax.enterprise.context.ApplicationScoped)19 PropertiesComponent (org.apache.camel.component.properties.PropertiesComponent)12 Provides (com.google.inject.Provides)10 Properties (java.util.Properties)10 Singleton (javax.inject.Singleton)8 ArrayList (java.util.ArrayList)7 HashMap (java.util.HashMap)6 Inject (javax.inject.Inject)5 NamedLiteral (org.apache.deltaspike.core.api.literal.NamedLiteral)4 Test (org.junit.Test)4 OperationsFacade (org.gluu.site.ldap.OperationsFacade)3 LdapEntryManager (org.gluu.site.ldap.persistence.LdapEntryManager)3 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)2 Gson (com.google.gson.Gson)2 GsonBuilder (com.google.gson.GsonBuilder)2 SystemProperties (com.iplanet.am.util.SystemProperties)2 Provides (dagger.Provides)2 PerApplication (io.hefuyi.listener.injector.scope.PerApplication)2