Examples of InjectService


Examples of org.amplafi.hivemind.annotations.InjectService

                    serviceMap.putIfAbsent(obj.getClass(), new ConcurrentHashMap<String, String>());
                    classServiceMap = serviceMap.get(obj.getClass());
                }
                String serviceName = classServiceMap.get(prop);
                if ( serviceName == null) {
                    InjectService service;
                    try {
                        service = findInjectService(obj, type);
                    } catch(DontInjectException e) {
                        // do nothing
                        alwaysExcludedCollection.add(prop);
                        continue;
                    }

                    if ( service != null ) {
                        serviceName = service.value();
                        if ( StringUtils.isNotBlank(serviceName)) {
                            for (String attempt: new String[] {
                                serviceName,
                                serviceName +'.' +type.getPropertyName(),
                                serviceName +'.' +StringUtils.capitalize(type.getPropertyName())
View Full Code Here

Examples of org.amplafi.hivemind.annotations.InjectService

     * @param propertyType
     * @return
     * @throws DontInjectException
     */
    private InjectService findInjectService(Object obj, PropertyAdaptor type) throws DontInjectException {
        InjectService service;
        Class<?> propertyType = type.getPropertyType();
        String propertyAccessorMethodName = "set"+StringUtils.capitalize(type.getPropertyName());
        service = findServiceAnnotation(obj, propertyAccessorMethodName, propertyType);
        if ( service == null ) {
            propertyAccessorMethodName = "get"+StringUtils.capitalize(type.getPropertyName());
View Full Code Here

Examples of org.amplafi.hivemind.annotations.InjectService

     * @return
     * @throws DontInjectException
     */
    private InjectService findServiceAnnotation(Object obj, String propertyAccessorMethodName, Class<?>... propertyType) throws DontInjectException {
        // look for @InjectService
        InjectService service= null;

        try {
            Method m = obj.getClass().getMethod(propertyAccessorMethodName, propertyType);
            if ( m.getAnnotation(NotService.class) != null ) {
                throw new DontInjectException();
View Full Code Here

Examples of org.apache.tapestry.ioc.annotations.InjectService

    @SuppressWarnings("unchecked")
    private static Object calculateParameterValue(Class parameterType,
            Annotation[] parameterAnnotations, ServiceLocator locator,
            Map<Class, Object> parameterDefaults)
    {
        InjectService is = findAnnotation(parameterAnnotations, InjectService.class);

        if (is != null)
        {
            String serviceId = is.value();

            return locator.getService(serviceId, parameterType);
        }

        Inject i = findAnnotation(parameterAnnotations, Inject.class);
View Full Code Here

Examples of org.apache.tapestry.ioc.annotations.InjectService

                return findAnnotation(parameterAnnotations, annotationClass);
            }

        };

        InjectService is = provider.getAnnotation(InjectService.class);

        if (is != null)
        {
            String serviceId = is.value();

            return locator.getService(serviceId, parameterType);
        }

        // In the absence of @InjectService, try some autowiring. First, does the
View Full Code Here

Examples of org.apache.tapestry.ioc.annotations.InjectService

        };

        // At some point, it would be nice to eliminate InjectService, and rely
        // entirely on service interface type and point-of-injection markers.

        InjectService is = provider.getAnnotation(InjectService.class);

        if (is != null)
        {
            String serviceId = is.value();

            return locator.getService(serviceId, parameterType);
        }

        // In the absence of @InjectService, try some autowiring. First, does the
View Full Code Here

Examples of org.apache.tapestry.ioc.annotations.InjectService

        };

        // At some point, it would be nice to eliminate InjectService, and rely
        // entirely on service interface type and point-of-injection markers.

        InjectService is = provider.getAnnotation(InjectService.class);

        if (is != null)
        {
            String serviceId = is.value();

            return locator.getService(serviceId, parameterType);
        }

        // In the absence of @InjectService, try some autowiring. First, does the
View Full Code Here

Examples of org.apache.tapestry.ioc.annotations.InjectService

                return findAnnotation(parameterAnnotations, annotationClass);
            }

        };

        InjectService is = provider.getAnnotation(InjectService.class);

        if (is != null)
        {
            String serviceId = is.value();

            return locator.getService(serviceId, parameterType);
        }

        // In the absence of @InjectService, try some autowiring. First, does the
View Full Code Here

Examples of org.apache.tapestry.ioc.annotations.InjectService

        };

        // At some point, it would be nice to eliminate InjectService, and rely
        // entirely on service interface type and point-of-injection markers.

        InjectService is = provider.getAnnotation(InjectService.class);

        if (is != null)
        {
            String serviceId = is.value();

            return locator.getService(serviceId, parameterType);
        }

        // In the absence of @InjectService, try some autowiring. First, does the
View Full Code Here

Examples of org.apache.tapestry.ioc.annotations.InjectService

    @SuppressWarnings("unchecked")
    private static Object calculateParameterValue(Class parameterType,
            Annotation[] parameterAnnotations, ServiceLocator locator,
            Map<Class, Object> parameterDefaults)
    {
        InjectService is = findAnnotation(parameterAnnotations, InjectService.class);

        if (is != null)
        {
            String serviceId = is.value();

            return locator.getService(serviceId, parameterType);
        }

        Inject i = findAnnotation(parameterAnnotations, Inject.class);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.