test_class.declarator: instanceProvider
test_class.modifier: private
test_class.original_string: private InstanceProvider instanceProvider;
test_class.type: InstanceProvider
test_class.var_name: instanceProvider
test_class.declarator: service1 = new MyService1()
test_class.modifier: private
test_class.original_string: private MyService1 service1 = new MyService1();
test_class.type: MyService1
test_class.var_name: service1
test_class.declarator: service2 = new MyService2()
test_class.modifier: private
test_class.original_string: private MyService2 service2 = new MyService2();
test_class.type: MyService2
test_class.var_name: service2
test_class.declarator: service3 = new MyService3()
test_class.modifier: private
test_class.original_string: private MyService3 service3 = new MyService3();
test_class.type: MyService3
test_class.var_name: service3
test_class.file: dddlib-domain/src/test/java/org/dayatang/domain/InstanceFactoryTest.java
test_class.identifier: InstanceFactoryTest
test_case.body: @Test
      public void testGetInstanceByServiceLoaderWithoutInstanceProvider() {
          assertNotNull(InstanceFactory.getInstance(Service2.class));
          assertEquals(service2, InstanceFactory.getInstance(Service.class, "service2"));
          assertEquals(service3, InstanceFactory.getInstance(Service.class, TheAnnotation.class));
      }
test_case.class_method_signature: InstanceFactoryTest.testGetInstanceByServiceLoaderWithoutInstanceProvider()
test_case.full_signature: @Test public void testGetInstanceByServiceLoaderWithoutInstanceProvider()
test_case.identifier: testGetInstanceByServiceLoaderWithoutInstanceProvider
test_case.invocations: assertNotNull getInstance assertEquals getInstance assertEquals getInstance
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGetInstanceByServiceLoaderWithoutInstanceProvider()
focal_class.declarator: LOGGER = LoggerFactory.getLogger(InstanceFactory.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = LoggerFactory.getLogger(InstanceFactory.class);
focal_class.type: Logger
focal_class.var_name: LOGGER
focal_class.declarator: instances = new HashMap<Object, Object>()
focal_class.modifier: private static final
focal_class.original_string: private static final Map<Object, Object> instances = new HashMap<Object, Object>();
focal_class.type: Map<Object, Object>
focal_class.var_name: instances
focal_class.declarator: instanceProvider
focal_class.modifier: private static
focal_class.original_string: private static InstanceProvider instanceProvider;
focal_class.type: InstanceProvider
focal_class.var_name: instanceProvider
focal_class.declarator: instanceLocatorFactory = ServiceLoader.load(InstanceLocatorFactory.class).iterator().next()
focal_class.modifier: private static
focal_class.original_string: private static InstanceLocatorFactory instanceLocatorFactory = ServiceLoader.load(InstanceLocatorFactory.class).iterator().next();
focal_class.type: InstanceLocatorFactory
focal_class.var_name: instanceLocatorFactory
focal_class.declarator: instanceLocators = new ArrayList<InstanceLocator>()
focal_class.modifier: private static
focal_class.original_string: private static List<InstanceLocator> instanceLocators = new ArrayList<InstanceLocator>();
focal_class.type: List<InstanceLocator>
focal_class.var_name: instanceLocators
focal_class.file: dddlib-domain/src/main/java/org/dayatang/domain/InstanceFactory.java
focal_class.identifier: InstanceFactory
focal_class.class_method_signature: InstanceFactory.InstanceFactory()
focal_class.full_signature: private  InstanceFactory()
focal_class.identifier: InstanceFactory
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  InstanceFactory()
focal_class.class_method_signature: InstanceFactory.setInstanceProvider(InstanceProvider provider)
focal_class.full_signature: public static void setInstanceProvider(InstanceProvider provider)
focal_class.identifier: setInstanceProvider
focal_class.modifiers: public static
focal_class.parameters: (InstanceProvider provider)
focal_class.return: void
focal_class.signature: void setInstanceProvider(InstanceProvider provider)
focal_class.class_method_signature: InstanceFactory.getInstance(Class<T> beanType)
focal_class.full_signature: @SuppressWarnings("unchecked") public static T getInstance(Class<T> beanType)
focal_class.identifier: getInstance
focal_class.modifiers: @SuppressWarnings("unchecked") public static
focal_class.parameters: (Class<T> beanType)
focal_class.return: T
focal_class.signature: T getInstance(Class<T> beanType)
focal_class.class_method_signature: InstanceFactory.getInstance(Class<T> beanType, String beanName)
focal_class.full_signature: @SuppressWarnings("unchecked") public static T getInstance(Class<T> beanType, String beanName)
focal_class.identifier: getInstance
focal_class.modifiers: @SuppressWarnings("unchecked") public static
focal_class.parameters: (Class<T> beanType, String beanName)
focal_class.return: T
focal_class.signature: T getInstance(Class<T> beanType, String beanName)
focal_class.class_method_signature: InstanceFactory.getInstance(Class<T> beanType, Class<? extends Annotation> annotationType)
focal_class.full_signature: public static T getInstance(Class<T> beanType, Class<? extends Annotation> annotationType)
focal_class.identifier: getInstance
focal_class.modifiers: public static
focal_class.parameters: (Class<T> beanType, Class<? extends Annotation> annotationType)
focal_class.return: T
focal_class.signature: T getInstance(Class<T> beanType, Class<? extends Annotation> annotationType)
focal_class.class_method_signature: InstanceFactory.bind(Class<T> serviceInterface, T serviceImplementation)
focal_class.full_signature: public static void bind(Class<T> serviceInterface, T serviceImplementation)
focal_class.identifier: bind
focal_class.modifiers: public static
focal_class.parameters: (Class<T> serviceInterface, T serviceImplementation)
focal_class.return: void
focal_class.signature: void bind(Class<T> serviceInterface, T serviceImplementation)
focal_class.class_method_signature: InstanceFactory.bind(Class<T> serviceInterface, T serviceImplementation, String beanName)
focal_class.full_signature: public static void bind(Class<T> serviceInterface, T serviceImplementation, String beanName)
focal_class.identifier: bind
focal_class.modifiers: public static
focal_class.parameters: (Class<T> serviceInterface, T serviceImplementation, String beanName)
focal_class.return: void
focal_class.signature: void bind(Class<T> serviceInterface, T serviceImplementation, String beanName)
focal_class.class_method_signature: InstanceFactory.clear()
focal_class.full_signature: public static void clear()
focal_class.identifier: clear
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void clear()
focal_class.class_method_signature: InstanceFactory.bind(Class<T> serviceInterface, T serviceImplementation, Class<? extends Annotation> annotationType)
focal_class.full_signature: public static void bind(Class<T> serviceInterface, T serviceImplementation, Class<? extends Annotation> annotationType)
focal_class.identifier: bind
focal_class.modifiers: public static
focal_class.parameters: (Class<T> serviceInterface, T serviceImplementation, Class<? extends Annotation> annotationType)
focal_class.return: void
focal_class.signature: void bind(Class<T> serviceInterface, T serviceImplementation, Class<? extends Annotation> annotationType)
focal_class.class_method_signature: InstanceFactory.toName(Class<?> beanType, String beanName)
focal_class.full_signature: private static String toName(Class<?> beanType, String beanName)
focal_class.identifier: toName
focal_class.modifiers: private static
focal_class.parameters: (Class<?> beanType, String beanName)
focal_class.return: String
focal_class.signature: String toName(Class<?> beanType, String beanName)
focal_class.class_method_signature: InstanceFactory.toName(Class<?> beanType, Class<? extends Annotation> annotationType)
focal_class.full_signature: private static String toName(Class<?> beanType, Class<? extends Annotation> annotationType)
focal_class.identifier: toName
focal_class.modifiers: private static
focal_class.parameters: (Class<?> beanType, Class<? extends Annotation> annotationType)
focal_class.return: String
focal_class.signature: String toName(Class<?> beanType, Class<? extends Annotation> annotationType)
focal_method.body: @SuppressWarnings("unchecked")
      public static <T> T getInstance(Class<T> beanType) {
          for (InstanceLocator locator : instanceLocators) {
              T result = locator.getInstance(beanType);
              if (result != null) {
                  return result;
              }
          }
          throw new IocInstanceNotFoundException("There's not bean of type '" + beanType + "' exists in IoC container!");
      }
focal_method.class_method_signature: InstanceFactory.getInstance(Class<T> beanType)
focal_method.full_signature: @SuppressWarnings("unchecked") public static T getInstance(Class<T> beanType)
focal_method.identifier: getInstance
focal_method.invocations: getInstance
focal_method.modifiers: @SuppressWarnings("unchecked") public static
focal_method.parameters: (Class<T> beanType)
focal_method.return: T
focal_method.signature: T getInstance(Class<T> beanType)