test_class.declarator: metadata
test_class.modifier: private
test_class.original_string: private AnnotatedElement metadata;
test_class.type: AnnotatedElement
test_class.var_name: metadata
test_class.declarator: delegate
test_class.modifier: private
test_class.original_string: private CodecFactory delegate;
test_class.type: CodecFactory
test_class.var_name: delegate
test_class.declarator: buffer
test_class.modifier: private
test_class.original_string: private BitBuffer buffer;
test_class.type: BitBuffer
test_class.var_name: buffer
test_class.declarator: resolver
test_class.modifier: private
test_class.original_string: private Resolver resolver;
test_class.type: Resolver
test_class.var_name: resolver
test_class.declarator: builder
test_class.modifier: private
test_class.original_string: private Builder builder;
test_class.type: Builder
test_class.var_name: builder
test_class.declarator: settings
test_class.modifier: private
test_class.original_string: private BoundObject settings;
test_class.type: BoundObject
test_class.var_name: settings
test_class.declarator: choices
test_class.modifier: private
test_class.original_string: private Choices choices;
test_class.type: Choices
test_class.var_name: choices
test_class.file: preon-binding/src/test/java/org/codehaus/preon/codec/ObjectCodecFactoryTest.java
test_class.identifier: ObjectCodecFactoryTest
test_case.body: @Test
      public void testBoundObjectNoMembersTwoTypesWithPrefix() throws DecodingException {
          Codec codecTest3 = createMock(Codec.class);
          Codec codecTest4 = createMock(Codec.class);
          expect(metadata.isAnnotationPresent(Bound.class)).andReturn(false).anyTimes();
          expect(metadata.isAnnotationPresent(BoundObject.class)).andReturn(true).anyTimes();
          expect(settings.selectFrom()).andReturn(choices).times(2);
          expect(choices.alternatives()).andReturn(new Choices.Choice[0]);
          expect(choices.defaultType()).andReturn((Class) Void.class);
          expect(metadata.getAnnotation(BoundObject.class)).andReturn(settings);
          expect(settings.type()).andReturn((Class) Void.class);
          expect(settings.types()).andReturn(new Class[]{TestObject3.class, TestObject4.class})
                  .times(2);
          expect(delegate.create(null, TestObject3.class, null)).andReturn(codecTest3);
          expect(codecTest3.getTypes()).andReturn(new Class<?>[]{TestObject3.class});
          expect(codecTest4.getTypes()).andReturn(new Class<?>[]{TestObject4.class});
          expect(delegate.create(null, TestObject4.class, null)).andReturn(codecTest4);
          // expect(codecTest3.getSize(resolver)).andReturn(6);
          // expect(codecTest4.getSize(resolver)).andReturn(6);
          expect(buffer.readAsLong(8, ByteOrder.LittleEndian)).andReturn(0L);
          expect(codecTest3.decode(buffer, resolver, builder)).andReturn(new TestObject3());
          replay(metadata, delegate, buffer, resolver, settings, codecTest3, codecTest4, builder,
                  choices);
          ObjectCodecFactory factory = new ObjectCodecFactory(delegate);
          Codec<TestObject1> codec = factory.create(metadata, TestObject1.class, null);
          assertNotNull(codec);
          TestObject1 result = codec.decode(buffer, resolver, builder);
          assertNotNull(result);
          assertTrue(!(result instanceof TestObject4));
          assertTrue(result instanceof TestObject3);
          verify(metadata, delegate, buffer, resolver, settings, codecTest3, codecTest4, builder,
                  choices);
      }
test_case.class_method_signature: ObjectCodecFactoryTest.testBoundObjectNoMembersTwoTypesWithPrefix()
test_case.full_signature: @Test public void testBoundObjectNoMembersTwoTypesWithPrefix()
test_case.identifier: testBoundObjectNoMembersTwoTypesWithPrefix
test_case.invocations: createMock createMock anyTimes andReturn expect isAnnotationPresent anyTimes andReturn expect isAnnotationPresent times andReturn expect selectFrom andReturn expect alternatives andReturn expect defaultType andReturn expect getAnnotation andReturn expect type times andReturn expect types andReturn expect create andReturn expect getTypes andReturn expect getTypes andReturn expect create andReturn expect readAsLong andReturn expect decode replay create assertNotNull decode assertNotNull assertTrue assertTrue verify
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testBoundObjectNoMembersTwoTypesWithPrefix()
focal_class.declarator: bindingFactory
focal_class.modifier: private
focal_class.original_string: private BindingFactory bindingFactory;
focal_class.type: BindingFactory
focal_class.var_name: bindingFactory
focal_class.declarator: codecFactory
focal_class.modifier: private
focal_class.original_string: private CodecFactory codecFactory;
focal_class.type: CodecFactory
focal_class.var_name: codecFactory
focal_class.declarator: rewriter = new ClassNameRewriter()
focal_class.modifier: private
focal_class.original_string: private IdentifierRewriter rewriter = new ClassNameRewriter();
focal_class.type: IdentifierRewriter
focal_class.var_name: rewriter
focal_class.file: preon-binding/src/main/java/org/codehaus/preon/codec/ObjectCodecFactory.java
focal_class.identifier: ObjectCodecFactory
focal_class.interfaces: implements CodecFactory
focal_class.class_method_signature: ObjectCodecFactory.ObjectCodecFactory()
focal_class.full_signature: public  ObjectCodecFactory()
focal_class.identifier: ObjectCodecFactory
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  ObjectCodecFactory()
focal_class.class_method_signature: ObjectCodecFactory.ObjectCodecFactory(CodecFactory codecFactory)
focal_class.full_signature: public  ObjectCodecFactory(CodecFactory codecFactory)
focal_class.identifier: ObjectCodecFactory
focal_class.modifiers: public
focal_class.parameters: (CodecFactory codecFactory)
focal_class.signature:  ObjectCodecFactory(CodecFactory codecFactory)
focal_class.class_method_signature: ObjectCodecFactory.ObjectCodecFactory(CodecFactory codecFactory,
                                BindingFactory bindingFactory)
focal_class.full_signature: public  ObjectCodecFactory(CodecFactory codecFactory,
                                BindingFactory bindingFactory)
focal_class.identifier: ObjectCodecFactory
focal_class.modifiers: public
focal_class.parameters: (CodecFactory codecFactory,
                                BindingFactory bindingFactory)
focal_class.signature:  ObjectCodecFactory(CodecFactory codecFactory,
                                BindingFactory bindingFactory)
focal_class.class_method_signature: ObjectCodecFactory.create(AnnotatedElement metadata, Class<T> type,
                                 ResolverContext context)
focal_class.full_signature: public Codec<T> create(AnnotatedElement metadata, Class<T> type,
                                 ResolverContext context)
focal_class.identifier: create
focal_class.modifiers: public
focal_class.parameters: (AnnotatedElement metadata, Class<T> type,
                                 ResolverContext context)
focal_class.return: Codec<T>
focal_class.signature: Codec<T> create(AnnotatedElement metadata, Class<T> type,
                                 ResolverContext context)
focal_class.class_method_signature: ObjectCodecFactory.createCodec(Class<T> type,
                                             ResolverContext context)
focal_class.full_signature: private ObjectCodec<T> createCodec(Class<T> type,
                                             ResolverContext context)
focal_class.identifier: createCodec
focal_class.modifiers: private
focal_class.parameters: (Class<T> type,
                                             ResolverContext context)
focal_class.return: ObjectCodec<T>
focal_class.signature: ObjectCodec<T> createCodec(Class<T> type,
                                             ResolverContext context)
focal_class.class_method_signature: ObjectCodecFactory.createCodec(Class<T> type, ResolverContext context,
                                       AnnotatedElement metadata)
focal_class.full_signature: @SuppressWarnings("unchecked") private Codec<T> createCodec(Class<T> type, ResolverContext context,
                                       AnnotatedElement metadata)
focal_class.identifier: createCodec
focal_class.modifiers: @SuppressWarnings("unchecked") private
focal_class.parameters: (Class<T> type, ResolverContext context,
                                       AnnotatedElement metadata)
focal_class.return: Codec<T>
focal_class.signature: Codec<T> createCodec(Class<T> type, ResolverContext context,
                                       AnnotatedElement metadata)
focal_class.class_method_signature: ObjectCodecFactory.hideChoices(AnnotatedElement metadata)
focal_class.full_signature: private AnnotatedElement hideChoices(AnnotatedElement metadata)
focal_class.identifier: hideChoices
focal_class.modifiers: private
focal_class.parameters: (AnnotatedElement metadata)
focal_class.return: AnnotatedElement
focal_class.signature: AnnotatedElement hideChoices(AnnotatedElement metadata)
focal_class.class_method_signature: ObjectCodecFactory.harvestBindings(Class<T> type,
                                       ObjectResolverContext context, CodecReference reference)
focal_class.full_signature: private void harvestBindings(Class<T> type,
                                       ObjectResolverContext context, CodecReference reference)
focal_class.identifier: harvestBindings
focal_class.modifiers: private
focal_class.parameters: (Class<T> type,
                                       ObjectResolverContext context, CodecReference reference)
focal_class.return: void
focal_class.signature: void harvestBindings(Class<T> type,
                                       ObjectResolverContext context, CodecReference reference)
focal_method.body: public <T> Codec<T> create(AnnotatedElement metadata, Class<T> type,
                                 ResolverContext context) {
          if (metadata == null) {
              return createCodec(type, context);
          } else if (metadata.isAnnotationPresent(Bound.class)) {
              return createCodec(type, context);
          } else if (metadata.isAnnotationPresent(BoundObject.class)) {
              return createCodec(type, context, metadata);
          } else {
              return null;
          }
      }
focal_method.class_method_signature: ObjectCodecFactory.create(AnnotatedElement metadata, Class<T> type,
                                 ResolverContext context)
focal_method.full_signature: public Codec<T> create(AnnotatedElement metadata, Class<T> type,
                                 ResolverContext context)
focal_method.identifier: create
focal_method.invocations: createCodec isAnnotationPresent createCodec isAnnotationPresent createCodec
focal_method.modifiers: public
focal_method.parameters: (AnnotatedElement metadata, Class<T> type,
                                 ResolverContext context)
focal_method.return: Codec<T>
focal_method.signature: Codec<T> create(AnnotatedElement metadata, Class<T> type,
                                 ResolverContext context)