Package org.osoa.sca.annotations

Examples of org.osoa.sca.annotations.ComponentName


        EventInvoker initInvoker = null;
        boolean eagerInit = false;
        EventInvoker destroyInvoker = null;
        for (Field field : fields) {
            ComponentName compName = field.getAnnotation(ComponentName.class);
            if (compName != null) {
                Injector injector = new FieldInjector(field, new SingletonObjectFactory(name));
                injectors.add(injector);
            }
            org.osoa.sca.annotations.Context context = field.getAnnotation(org.osoa.sca.annotations.Context.class);
            if (context != null) {
                Injector injector = new FieldInjector(field, new SingletonObjectFactory(moduleComponentContext));
                injectors.add(injector);
            }
        }
        for (Method method : methods) {
            // FIXME Java5
            Init init = method.getAnnotation(Init.class);
            if (init != null && initInvoker == null) {
                initInvoker = new MethodEventInvoker(method);
                eagerInit = init.eager();
                continue;
            }
            Destroy destroy = method.getAnnotation(Destroy.class);
            if (destroy != null && destroyInvoker == null) {
                destroyInvoker = new MethodEventInvoker(method);
                continue;
            }
            ComponentName compName = method.getAnnotation(ComponentName.class);
            if (compName != null) {
                Injector injector = new MethodInjector(method, new SingletonObjectFactory(name));
                injectors.add(injector);
            }
            org.osoa.sca.annotations.Context context = method.getAnnotation(org.osoa.sca.annotations.Context.class);
View Full Code Here


    public ComponentNameProcessor(AssemblyFactory factory) {
        super(factory);
    }

    public void visitMethod(Method method, ComponentType type) throws ConfigurationLoadException {
        ComponentName name = method.getAnnotation(ComponentName.class);
        if (name == null) {
            return;
        }
        type.getExtensibilityElements().add(new ComponentNameExtensibilityElement(method));
    }
View Full Code Here

        }
        type.getExtensibilityElements().add(new ComponentNameExtensibilityElement(method));
    }

    public void visitField(Field field, ComponentType type) throws ConfigurationLoadException {
        ComponentName name = field.getAnnotation(ComponentName.class);
        if (name == null) {
            return;
        }
        type.getExtensibilityElements().add(new ComponentNameExtensibilityElement(field));
    }
View Full Code Here

TOP

Related Classes of org.osoa.sca.annotations.ComponentName

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.