test_class.declarator: metadata
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private AnnotatedElement metadata;
test_class.type: AnnotatedElement
test_class.var_name: metadata
test_class.declarator: boundList
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private BoundList boundList;
test_class.type: BoundList
test_class.var_name: boundList
test_class.declarator: delegate
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private CodecFactory delegate;
test_class.type: CodecFactory
test_class.var_name: delegate
test_class.declarator: context
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private ResolverContext context;
test_class.type: ResolverContext
test_class.var_name: context
test_class.declarator: factory
test_class.modifier: private
test_class.original_string: private ArrayCodecFactory factory;
test_class.type: ArrayCodecFactory
test_class.var_name: factory
test_class.file: preon-binding/src/test/java/org/codehaus/preon/codec/ArrayCodecFactoryTest.java
test_class.identifier: ArrayCodecFactoryTest
test_case.body: @Test
      public void shouldNotTryToReturnCodecInCaseSizeUndefined() {
          Object array = new byte[0];
          Class<?> type = array.getClass();
          when(metadata.getAnnotation(BoundList.class)).thenReturn(boundList);
          when(boundList.size()).thenReturn("");
          assertThat(factory.create(metadata, type, context), is(nullValue()));
      }
test_case.class_method_signature: ArrayCodecFactoryTest.shouldNotTryToReturnCodecInCaseSizeUndefined()
test_case.full_signature: @Test public void shouldNotTryToReturnCodecInCaseSizeUndefined()
test_case.identifier: shouldNotTryToReturnCodecInCaseSizeUndefined
test_case.invocations: getClass thenReturn when getAnnotation thenReturn when size assertThat create is nullValue
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void shouldNotTryToReturnCodecInCaseSizeUndefined()
focal_class.declarator: factory
focal_class.modifier: private
focal_class.original_string: private CodecFactory factory;
focal_class.type: CodecFactory
focal_class.var_name: factory
focal_class.file: preon-binding/src/main/java/org/codehaus/preon/codec/ArrayCodecFactory.java
focal_class.identifier: ArrayCodecFactory
focal_class.interfaces: implements CodecFactory
focal_class.class_method_signature: ArrayCodecFactory.ArrayCodecFactory(CodecFactory delegate)
focal_class.full_signature: public  ArrayCodecFactory(CodecFactory delegate)
focal_class.identifier: ArrayCodecFactory
focal_class.modifiers: public
focal_class.parameters: (CodecFactory delegate)
focal_class.signature:  ArrayCodecFactory(CodecFactory delegate)
focal_class.class_method_signature: ArrayCodecFactory.create(AnnotatedElement metadata, Class<T> type,
                                 ResolverContext context)
focal_class.full_signature: @SuppressWarnings("unchecked") public Codec<T> create(AnnotatedElement metadata, Class<T> type,
                                 ResolverContext context)
focal_class.identifier: create
focal_class.modifiers: @SuppressWarnings("unchecked") 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: ArrayCodecFactory.getObjectSettings(final BoundList settings)
focal_class.full_signature: private BoundObject getObjectSettings(final BoundList settings)
focal_class.identifier: getObjectSettings
focal_class.modifiers: private
focal_class.parameters: (final BoundList settings)
focal_class.return: BoundObject
focal_class.signature: BoundObject getObjectSettings(final BoundList settings)
focal_class.class_method_signature: ArrayCodecFactory.getSizeExpression(
              BoundList listSettings, ResolverContext context)
focal_class.full_signature: private Expression<Integer, Resolver> getSizeExpression(
              BoundList listSettings, ResolverContext context)
focal_class.identifier: getSizeExpression
focal_class.modifiers: private
focal_class.parameters: (
              BoundList listSettings, ResolverContext context)
focal_class.return: Expression<Integer, Resolver>
focal_class.signature: Expression<Integer, Resolver> getSizeExpression(
              BoundList listSettings, ResolverContext context)
focal_method.body: @SuppressWarnings("unchecked")
      public <T> Codec<T> create(AnnotatedElement metadata, Class<T> type,
                                 ResolverContext context) {
          BoundList settings = null;
          if (metadata != null
                  && (settings = metadata.getAnnotation(BoundList.class)) != null
                  && type.isArray()
                  && settings.size() != null
                  && settings.size().length() != 0) {
              Expression<Integer, Resolver> expr = getSizeExpression(settings,
                      context);
              Codec<Object> elementCodec = null;
              if (type.getComponentType().isPrimitive()) {
                  elementCodec = (Codec<Object>) factory.create(null, type
                          .getComponentType(), context);
              } else {
                  BoundObject objectSettings = getObjectSettings(settings);
                  elementCodec = (Codec<Object>) factory.create(
                          new AnnotationWrapper(objectSettings), type
                                  .getComponentType(), context);
              }
              return (Codec<T>) new ArrayCodec(expr, elementCodec, type);
          } else {
              return null;
          }
  
      }
focal_method.class_method_signature: ArrayCodecFactory.create(AnnotatedElement metadata, Class<T> type,
                                 ResolverContext context)
focal_method.full_signature: @SuppressWarnings("unchecked") public Codec<T> create(AnnotatedElement metadata, Class<T> type,
                                 ResolverContext context)
focal_method.identifier: create
focal_method.invocations: getAnnotation isArray size length size getSizeExpression isPrimitive getComponentType create getComponentType getObjectSettings create getComponentType
focal_method.modifiers: @SuppressWarnings("unchecked") 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)