Examples of FactoryFor


Examples of org.jvnet.hk2.annotations.FactoryFor

      public boolean inhabitantIndexChanged(EventType eventType, Habitat habitat,
          Inhabitant<?> i, String index, String name, Object service) {

        // for each FactoryFor component, insert inhabitant for components created by the factory
        if (index.equals(FactoryFor.class.getName())) {
            FactoryFor ff = i.type().getAnnotation(FactoryFor.class);
            Class<?> targetClass = ff.value();
            FactoryCreator target = new FactoryCreator(targetClass, i, habitat, MultiMap.<String,String>emptyMap());
            habitat.add(target);
            habitat.addIndex(target, targetClass.getName(), null);
        }
       
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.