Package org.springframework.context.annotation

Examples of org.springframework.context.annotation.Primary


    public static <T> T getComponent(Class<T> beanType) {
        assert(s_appContext != null);
        Map<String, T> matchedTypes = getComponentsOfType(beanType);
        if(matchedTypes.size() > 0) {
            for(Map.Entry<String, T> entry : matchedTypes.entrySet()) {
                Primary primary = getTargetClass(entry.getValue()).getAnnotation(Primary.class);
                if(primary != null)
                    return entry.getValue();
            }

            if(matchedTypes.size() > 1) {
View Full Code Here


    public static <T> T getComponent(Class<T> beanType) {
        assert (s_appContext != null);
        Map<String, T> matchedTypes = getComponentsOfType(beanType);
        if (matchedTypes.size() > 0) {
            for (Map.Entry<String, T> entry : matchedTypes.entrySet()) {
                Primary primary = getTargetClass(entry.getValue()).getAnnotation(Primary.class);
                if (primary != null)
                    return entry.getValue();
            }

            if (matchedTypes.size() > 1) {
View Full Code Here

    public static <T> T getComponent(Class<T> beanType) {
        assert (s_appContext != null);
        Map<String, T> matchedTypes = getComponentsOfType(beanType);
        if (matchedTypes.size() > 0) {
            for (Map.Entry<String, T> entry : matchedTypes.entrySet()) {
                Primary primary = getTargetClass(entry.getValue()).getAnnotation(Primary.class);
                if (primary != null)
                    return entry.getValue();
            }

            if (matchedTypes.size() > 1) {
View Full Code Here

    public static <T> T getComponent(Class<T> beanType) {
        assert(s_appContext != null);
        Map<String, T> matchedTypes = getComponentsOfType(beanType);
        if(matchedTypes.size() > 0) {
            for(Map.Entry<String, T> entry : matchedTypes.entrySet()) {
                Primary primary = getTargetClass(entry.getValue()).getAnnotation(Primary.class);
                if(primary != null)
                    return entry.getValue();
            }

            if(matchedTypes.size() > 1) {
View Full Code Here

TOP

Related Classes of org.springframework.context.annotation.Primary

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.