test_class.declarator: typeProducerFactory
test_class.modifier: private
test_class.original_string: private TypeProducerFactory typeProducerFactory;
test_class.type: TypeProducerFactory
test_class.var_name: typeProducerFactory
test_class.file: everrest-core/src/test/java/org/everrest/core/impl/method/TypeProducerFactoryTest.java
test_class.identifier: TypeProducerFactoryTest
test_case.body: @Test(expected = IllegalArgumentException.class)
      public void throwsExceptionWhenNeitherStringConstructorNorStringValueOfMethodAvailable() throws Exception {
          typeProducerFactory.createTypeProducer(NoStringConstructorNoValueOfClass.class, null);
      }
test_case.class_method_signature: TypeProducerFactoryTest.throwsExceptionWhenNeitherStringConstructorNorStringValueOfMethodAvailable()
test_case.full_signature: @Test(expected = IllegalArgumentException.class) public void throwsExceptionWhenNeitherStringConstructorNorStringValueOfMethodAvailable()
test_case.identifier: throwsExceptionWhenNeitherStringConstructorNorStringValueOfMethodAvailable
test_case.invocations: createTypeProducer
test_case.modifiers: @Test(expected = IllegalArgumentException.class) public
test_case.parameters: ()
test_case.return: void
test_case.signature: void throwsExceptionWhenNeitherStringConstructorNorStringValueOfMethodAvailable()
focal_class.file: everrest-core/src/main/java/org/everrest/core/impl/method/TypeProducerFactory.java
focal_class.identifier: TypeProducerFactory
focal_class.class_method_signature: TypeProducerFactory.createTypeProducer(Class<?> aClass, Type genericType)
focal_class.full_signature: public TypeProducer createTypeProducer(Class<?> aClass, Type genericType)
focal_class.identifier: createTypeProducer
focal_class.modifiers: public
focal_class.parameters: (Class<?> aClass, Type genericType)
focal_class.return: TypeProducer
focal_class.signature: TypeProducer createTypeProducer(Class<?> aClass, Type genericType)
focal_class.class_method_signature: TypeProducerFactory.getActualTypeArgument(Type type)
focal_class.full_signature: private Class<?> getActualTypeArgument(Type type)
focal_class.identifier: getActualTypeArgument
focal_class.modifiers: private
focal_class.parameters: (Type type)
focal_class.return: Class<?>
focal_class.signature: Class<?> getActualTypeArgument(Type type)
focal_method.body: public TypeProducer createTypeProducer(Class<?> aClass, Type genericType) {
          if (aClass == List.class || aClass == Set.class || aClass == SortedSet.class) {
              Class<?> actualTypeArgument = null;
              if (genericType != null) {
                  actualTypeArgument = getActualTypeArgument(genericType);
              }
              Method methodValueOf;
              Constructor<?> constructor;
  
              if (actualTypeArgument == String.class || actualTypeArgument == null) {
                  return new CollectionStringProducer(aClass);
              } else if ((methodValueOf = getStringValueOfMethod(actualTypeArgument)) != null) {
                  return new CollectionStringValueOfProducer(aClass, methodValueOf);
              } else if ((constructor = getStringConstructor(actualTypeArgument)) != null) {
                  return new CollectionStringConstructorProducer(aClass, constructor);
              }
          } else {
              Method methodValueOf;
              Constructor<?> constructor;
  
              if (aClass.isPrimitive()) {
                  return new PrimitiveTypeProducer(aClass);
              } else if (aClass == String.class) {
                  return new StringProducer();
              } else if ((methodValueOf = getStringValueOfMethod(aClass)) != null) {
                  return new StringValueOfProducer(methodValueOf);
              } else if ((constructor = getStringConstructor(aClass)) != null) {
                  return new StringConstructorProducer(constructor);
              }
          }
  
          throw new IllegalArgumentException(String.format("Unsupported type %s", aClass));
      }
focal_method.class_method_signature: TypeProducerFactory.createTypeProducer(Class<?> aClass, Type genericType)
focal_method.full_signature: public TypeProducer createTypeProducer(Class<?> aClass, Type genericType)
focal_method.identifier: createTypeProducer
focal_method.invocations: getActualTypeArgument getStringValueOfMethod getStringConstructor isPrimitive getStringValueOfMethod getStringConstructor format
focal_method.modifiers: public
focal_method.parameters: (Class<?> aClass, Type genericType)
focal_method.return: TypeProducer
focal_method.signature: TypeProducer createTypeProducer(Class<?> aClass, Type genericType)