test_class.declarator: typeContainer
test_class.original_string: TypeContainer typeContainer;
test_class.type: TypeContainer
test_class.var_name: typeContainer
test_class.file: core/src/test/java/com/github/jsr330/instance/TypeContainerTest.java
test_class.identifier: TypeContainerTest
test_case.body: @SuppressWarnings("unchecked")
      @Test
      public void gatherInformation_Singleton() {
          Constructor<Bean4> ctor = null;
          
          for (Constructor<?> tmp : Bean4.class.getDeclaredConstructors()) {
              if (tmp.getParameterTypes().length == 0) {
                  ctor = (Constructor<Bean4>) tmp;
                  break;
              }
          }
          
          typeContainer = new TypeContainer(Bean4.class, ctor);
          
          assertNull(typeContainer.injectionSets);
          
          typeContainer.gatherInformation();
          
          assertNotNull(typeContainer.injectionSets);
          assertEquals(4, typeContainer.injectionSets.length);
          assertEquals(Bean1.class, typeContainer.injectionSets[0].type);
          assertEquals(Bean2.class, typeContainer.injectionSets[1].type);
          assertEquals(Bean3.class, typeContainer.injectionSets[2].type);
          assertEquals(Bean4.class, typeContainer.injectionSets[3].type);
          assertTrue(typeContainer.singleton);
          
          assertEquals(1, typeContainer.injectionSets[0].methods.length);
          assertEquals("contained1_1", typeContainer.injectionSets[0].methods[0].getName());
          
          assertEquals(1, typeContainer.injectionSets[0].staticMethods.length);
          assertEquals("contained1_2", typeContainer.injectionSets[0].staticMethods[0].getName());
          
          assertEquals(1, typeContainer.injectionSets[0].staticFields.length);
          assertEquals("contained1_3", typeContainer.injectionSets[0].staticFields[0].getName());
          
          assertEquals(1, typeContainer.injectionSets[0].fields.length);
          assertEquals("contained1_4", typeContainer.injectionSets[0].fields[0].getName());
          
          assertEquals(1, typeContainer.injectionSets[1].methods.length);
          assertEquals("contained2_1", typeContainer.injectionSets[1].methods[0].getName());
          
          assertEquals(1, typeContainer.injectionSets[1].staticMethods.length);
          assertEquals("contained2_2", typeContainer.injectionSets[1].staticMethods[0].getName());
          
          assertEquals(1, typeContainer.injectionSets[1].staticFields.length);
          assertEquals("contained2_3", typeContainer.injectionSets[1].staticFields[0].getName());
          
          assertEquals(1, typeContainer.injectionSets[1].fields.length);
          assertEquals("contained2_4", typeContainer.injectionSets[1].fields[0].getName());
          
          assertEquals(1, typeContainer.injectionSets[2].methods.length);
          assertEquals("contained3_1", typeContainer.injectionSets[2].methods[0].getName());
          
          assertEquals(1, typeContainer.injectionSets[2].staticMethods.length);
          assertEquals("contained3_2", typeContainer.injectionSets[2].staticMethods[0].getName());
          
          assertEquals(1, typeContainer.injectionSets[2].staticFields.length);
          assertEquals("contained3_3", typeContainer.injectionSets[2].staticFields[0].getName());
          
          assertEquals(1, typeContainer.injectionSets[2].fields.length);
          assertEquals("contained3_4", typeContainer.injectionSets[2].fields[0].getName());
          
          assertEquals(1, typeContainer.injectionSets[3].methods.length);
          assertEquals("contained4_1", typeContainer.injectionSets[3].methods[0].getName());
          
          assertEquals(1, typeContainer.injectionSets[3].staticMethods.length);
          assertEquals("contained4_2", typeContainer.injectionSets[3].staticMethods[0].getName());
          
          assertEquals(1, typeContainer.injectionSets[3].staticFields.length);
          assertEquals("contained4_3", typeContainer.injectionSets[3].staticFields[0].getName());
          
          assertEquals(1, typeContainer.injectionSets[3].fields.length);
          assertEquals("contained4_4", typeContainer.injectionSets[3].fields[0].getName());
      }
test_case.class_method_signature: TypeContainerTest.gatherInformation_Singleton()
test_case.full_signature: @SuppressWarnings("unchecked") @Test public void gatherInformation_Singleton()
test_case.identifier: gatherInformation_Singleton
test_case.invocations: getDeclaredConstructors getParameterTypes assertNull gatherInformation assertNotNull assertEquals assertEquals assertEquals assertEquals assertEquals assertTrue assertEquals assertEquals getName assertEquals assertEquals getName assertEquals assertEquals getName assertEquals assertEquals getName assertEquals assertEquals getName assertEquals assertEquals getName assertEquals assertEquals getName assertEquals assertEquals getName assertEquals assertEquals getName assertEquals assertEquals getName assertEquals assertEquals getName assertEquals assertEquals getName assertEquals assertEquals getName assertEquals assertEquals getName assertEquals assertEquals getName assertEquals assertEquals getName
test_case.modifiers: @SuppressWarnings("unchecked") @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void gatherInformation_Singleton()
focal_class.declarator: EMPTY_FIELD_ARRAY = new Field[] {}
focal_class.modifier: private static final
focal_class.original_string: private static final Field[] EMPTY_FIELD_ARRAY = new Field[] {};
focal_class.type: Field[]
focal_class.var_name: EMPTY_FIELD_ARRAY
focal_class.declarator: EMPTY_METHOD_ARRAY = new Method[] {}
focal_class.modifier: private static final
focal_class.original_string: private static final Method[] EMPTY_METHOD_ARRAY = new Method[] {};
focal_class.type: Method[]
focal_class.var_name: EMPTY_METHOD_ARRAY
focal_class.declarator: EMPTY_INJECTIONSET_ARRAY = new InjectionSet[] {}
focal_class.modifier: private static final
focal_class.original_string: private static final InjectionSet[] EMPTY_INJECTIONSET_ARRAY = new InjectionSet[] {};
focal_class.type: InjectionSet[]
focal_class.var_name: EMPTY_INJECTIONSET_ARRAY
focal_class.declarator: injectionSets
focal_class.modifier: protected
focal_class.original_string: protected InjectionSet[] injectionSets;
focal_class.type: InjectionSet[]
focal_class.var_name: injectionSets
focal_class.declarator: type
focal_class.modifier: protected
focal_class.original_string: protected Class<?> type;
focal_class.type: Class<?>
focal_class.var_name: type
focal_class.declarator: constructor
focal_class.modifier: protected
focal_class.original_string: protected Constructor<?> constructor;
focal_class.type: Constructor<?>
focal_class.var_name: constructor
focal_class.declarator: provider
focal_class.modifier: protected
focal_class.original_string: protected Provider<?> provider;
focal_class.type: Provider<?>
focal_class.var_name: provider
focal_class.declarator: factoryMethod
focal_class.modifier: protected
focal_class.original_string: protected Method factoryMethod;
focal_class.type: Method
focal_class.var_name: factoryMethod
focal_class.declarator: singleton = false
focal_class.modifier: protected
focal_class.original_string: protected boolean singleton = false;
focal_class.type: boolean
focal_class.var_name: singleton
focal_class.declarator: instanceMode = InstanceMode.CONSTRUCTOR
focal_class.modifier: protected
focal_class.original_string: protected InstanceMode instanceMode = InstanceMode.CONSTRUCTOR;
focal_class.type: InstanceMode
focal_class.var_name: instanceMode
focal_class.file: core/src/main/java/com/github/jsr330/instance/TypeContainer.java
focal_class.identifier: TypeContainer
focal_class.class_method_signature: TypeContainer.TypeContainer(Class<?> type, Constructor<?> constructor)
focal_class.full_signature: public  TypeContainer(Class<?> type, Constructor<?> constructor)
focal_class.identifier: TypeContainer
focal_class.modifiers: public
focal_class.parameters: (Class<?> type, Constructor<?> constructor)
focal_class.signature:  TypeContainer(Class<?> type, Constructor<?> constructor)
focal_class.class_method_signature: TypeContainer.gatherInformation()
focal_class.full_signature: public void gatherInformation()
focal_class.identifier: gatherInformation
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void gatherInformation()
focal_class.class_method_signature: TypeContainer.getMethodInformation()
focal_class.full_signature: protected void getMethodInformation()
focal_class.identifier: getMethodInformation
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void getMethodInformation()
focal_class.class_method_signature: TypeContainer.getPackageName(Method method)
focal_class.full_signature: protected String getPackageName(Method method)
focal_class.identifier: getPackageName
focal_class.modifiers: protected
focal_class.parameters: (Method method)
focal_class.return: String
focal_class.signature: String getPackageName(Method method)
focal_class.class_method_signature: TypeContainer.isSamePackage(Method oldMethod, Method method)
focal_class.full_signature: protected boolean isSamePackage(Method oldMethod, Method method)
focal_class.identifier: isSamePackage
focal_class.modifiers: protected
focal_class.parameters: (Method oldMethod, Method method)
focal_class.return: boolean
focal_class.signature: boolean isSamePackage(Method oldMethod, Method method)
focal_class.class_method_signature: TypeContainer.getFieldInformation()
focal_class.full_signature: protected void getFieldInformation()
focal_class.identifier: getFieldInformation
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void getFieldInformation()
focal_class.class_method_signature: TypeContainer.getProvider()
focal_class.full_signature: public Provider<?> getProvider()
focal_class.identifier: getProvider
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Provider<?>
focal_class.signature: Provider<?> getProvider()
focal_class.class_method_signature: TypeContainer.setProvider(Provider<?> provider)
focal_class.full_signature: public void setProvider(Provider<?> provider)
focal_class.identifier: setProvider
focal_class.modifiers: public
focal_class.parameters: (Provider<?> provider)
focal_class.return: void
focal_class.signature: void setProvider(Provider<?> provider)
focal_class.class_method_signature: TypeContainer.getInjectionSets()
focal_class.full_signature: public InjectionSet[] getInjectionSets()
focal_class.identifier: getInjectionSets
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: InjectionSet[]
focal_class.signature: InjectionSet[] getInjectionSets()
focal_class.class_method_signature: TypeContainer.setInjectionSets(InjectionSet[] injectionSets)
focal_class.full_signature: public void setInjectionSets(InjectionSet[] injectionSets)
focal_class.identifier: setInjectionSets
focal_class.modifiers: public
focal_class.parameters: (InjectionSet[] injectionSets)
focal_class.return: void
focal_class.signature: void setInjectionSets(InjectionSet[] injectionSets)
focal_class.class_method_signature: TypeContainer.getType()
focal_class.full_signature: public Class<?> getType()
focal_class.identifier: getType
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Class<?>
focal_class.signature: Class<?> getType()
focal_class.class_method_signature: TypeContainer.setType(Class<?> type)
focal_class.full_signature: public void setType(Class<?> type)
focal_class.identifier: setType
focal_class.modifiers: public
focal_class.parameters: (Class<?> type)
focal_class.return: void
focal_class.signature: void setType(Class<?> type)
focal_class.class_method_signature: TypeContainer.getConstructor()
focal_class.full_signature: public Constructor<?> getConstructor()
focal_class.identifier: getConstructor
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Constructor<?>
focal_class.signature: Constructor<?> getConstructor()
focal_class.class_method_signature: TypeContainer.setConstructor(Constructor<?> constructor)
focal_class.full_signature: public void setConstructor(Constructor<?> constructor)
focal_class.identifier: setConstructor
focal_class.modifiers: public
focal_class.parameters: (Constructor<?> constructor)
focal_class.return: void
focal_class.signature: void setConstructor(Constructor<?> constructor)
focal_class.class_method_signature: TypeContainer.isSingleton()
focal_class.full_signature: public boolean isSingleton()
focal_class.identifier: isSingleton
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isSingleton()
focal_class.class_method_signature: TypeContainer.setSingleton(boolean singleton)
focal_class.full_signature: public void setSingleton(boolean singleton)
focal_class.identifier: setSingleton
focal_class.modifiers: public
focal_class.parameters: (boolean singleton)
focal_class.return: void
focal_class.signature: void setSingleton(boolean singleton)
focal_class.class_method_signature: TypeContainer.getFactoryMethod()
focal_class.full_signature: public Method getFactoryMethod()
focal_class.identifier: getFactoryMethod
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Method
focal_class.signature: Method getFactoryMethod()
focal_class.class_method_signature: TypeContainer.setFactoryMethod(Method factoryMethod)
focal_class.full_signature: public void setFactoryMethod(Method factoryMethod)
focal_class.identifier: setFactoryMethod
focal_class.modifiers: public
focal_class.parameters: (Method factoryMethod)
focal_class.return: void
focal_class.signature: void setFactoryMethod(Method factoryMethod)
focal_class.class_method_signature: TypeContainer.getInstanceMode()
focal_class.full_signature: public InstanceMode getInstanceMode()
focal_class.identifier: getInstanceMode
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: InstanceMode
focal_class.signature: InstanceMode getInstanceMode()
focal_class.class_method_signature: TypeContainer.setInstanceMode(InstanceMode instanceMode)
focal_class.full_signature: public void setInstanceMode(InstanceMode instanceMode)
focal_class.identifier: setInstanceMode
focal_class.modifiers: public
focal_class.parameters: (InstanceMode instanceMode)
focal_class.return: void
focal_class.signature: void setInstanceMode(InstanceMode instanceMode)
focal_class.class_method_signature: TypeContainer.toString()
focal_class.full_signature: @Override public String toString()
focal_class.identifier: toString
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String toString()
focal_method.body: public void gatherInformation() {
          Stack<Class<?>> hierarchie;
          Class<?> parent;
          InjectionSet injectionSet;
          List<InjectionSet> injectionSets = new ArrayList<InjectionSet>();
          
          hierarchie = new Stack<Class<?>>();
          hierarchie.push(parent = type);
          while ((parent = parent.getSuperclass()) != null) {
              if (!parent.equals(Object.class)) {
                  hierarchie.push(parent);
              }
          }
          
          while (!hierarchie.isEmpty()) {
              parent = hierarchie.pop();
              if (!parent.equals(Object.class)) {
                  injectionSet = new InjectionSet();
                  injectionSet.type = parent;
                  injectionSets.add(injectionSet);
              }
          }
          
          this.injectionSets = injectionSets.toArray(EMPTY_INJECTIONSET_ARRAY);
          
          singleton = type.isAnnotationPresent(Singleton.class);
          getFieldInformation();
          getMethodInformation();
      }
focal_method.class_method_signature: TypeContainer.gatherInformation()
focal_method.full_signature: public void gatherInformation()
focal_method.identifier: gatherInformation
focal_method.invocations: push getSuperclass equals push isEmpty pop equals add toArray isAnnotationPresent getFieldInformation getMethodInformation
focal_method.modifiers: public
focal_method.parameters: ()
focal_method.return: void
focal_method.signature: void gatherInformation()