private void generateMarshaller(final GeneratorContext context, final MetaClass type, final String className,
final String marshallerTypeName, final TreeLogger logger, final PrintWriter printWriter) {
MarshallerOutputTarget target = MarshallerOutputTarget.GWT;
final MappingStrategy strategy =
MappingStrategyFactory.createStrategy(true, GeneratorMappingContextFactory.getFor(context, target), type);
String gen = null;
if (type.isArray()) {
BuildMetaClass marshallerClass =
MarshallerGeneratorFactory.generateArrayMarshaller(type, marshallerTypeName, true);
gen = marshallerClass.toJavaString();
}
else {
final ClassStructureBuilder<?> marshaller = strategy.getMapper().getMarshaller(marshallerTypeName);
gen = marshaller.toJavaString();
}
printWriter.append(gen);
final File tmpFile = new File(RebindUtils.getErraiCacheDir().getAbsolutePath() + "/" + className + ".java");