Package com.github.overengineer.container

Examples of com.github.overengineer.container.SelectionAdvisor


            return proxy.getClass().getName() + '@' + Integer.toHexString(System.identityHashCode(this)) + "$DynamicComposite$[" + componentInterface.getName() + "]";
        }

        //TODO add double-check locking
        if (components == null) {
            components = provider.getAll(componentInterface, new SelectionAdvisor() {
                @Override
                public boolean validSelection(ComponentStrategy<?> candidateStrategy) {
                    Class<?> candidateClass = candidateStrategy.getComponentType();
                    return candidateClass != proxy.getClass() || Proxy.isProxyClass(candidateClass);
                }
View Full Code Here


        this.injectionTarget = injectionTarget;
    }

    @Override
    public T get(Provider provider) {
        return provider.get(key, new SelectionAdvisor() {
            @Override
            public boolean validSelection(ComponentStrategy<?> candidateStrategy) {
                return candidateStrategy.getComponentType() != injectionTarget; //TODO this prevents self injection.  OK??
            }
        });
View Full Code Here

TOP

Related Classes of com.github.overengineer.container.SelectionAdvisor

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.