Package org.amplafi.hivemind.annotations

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


     * @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

     * @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

TOP

Related Classes of org.amplafi.hivemind.annotations.InjectService

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.