protected Type createSerializationFactoryComposer(final Method method, final NewConcreteType client, final Type serviceInterface) {
Checker.notNull("parameter:method", method);
Checker.notNull("parameter:client", client);
Checker.notNull("parameter:serviceInterface", serviceInterface);
final NewNestedInterfaceType serializationFactoryComposer = client.newNestedInterfaceType();
final List<Type> parameterTypes = new ArrayList<Type>();
final Iterator<MethodParameter> methodParameters = method.getParameters().iterator();
while (methodParameters.hasNext()) {
final MethodParameter parameter = methodParameters.next();
parameterTypes.add(parameter.getType());
}
final Method serviceMethod = serviceInterface.findMethod(method.getName(), parameterTypes);
final List<Method> serviceMethods = new ArrayList<Method>();
serviceMethods.addAll(serviceInterface.getMethods());
final int methodNumber = serviceMethods.indexOf(serviceMethod);
final String newNestedName = Constants.NESTED_SERIALIZATION_FACTORY_COMPOSER + methodNumber;
serializationFactoryComposer.setNestedName(newNestedName);
serializationFactoryComposer.setSuperType(this.getSerializationFactoryComposer());
serializationFactoryComposer.setStatic(false);
serializationFactoryComposer.setVisibility(Visibility.PUBLIC);
// build up a set containing of readableType which will contain all
// throwable types and the method return type.
final Set<Type> readableTypes = new TreeSet(TypeComparator.INSTANCE);
final Set<Type> writableTypes = new TreeSet(TypeComparator.INSTANCE);