1 28 package org.jvyamlb; 29 30 import java.io.InputStream ; 31 import java.io.OutputStream ; 32 33 import org.jruby.util.ByteList; 34 35 38 public class DefaultYAMLFactory implements YAMLFactory { 39 public Scanner createScanner(final ByteList io) { 40 return new ScannerImpl(io); 41 } 42 public Scanner createScanner(final InputStream io) { 43 return new ScannerImpl(io); 44 } 45 public Parser createParser(final Scanner scanner) { 46 return new ParserImpl(scanner); 47 } 48 public Parser createParser(final Scanner scanner, final YAMLConfig cfg) { 49 return new ParserImpl(scanner,cfg); 50 } 51 public Resolver createResolver() { 52 return new ResolverImpl(); 53 } 54 public Composer createComposer(final Parser parser, final Resolver resolver) { 55 return new ComposerImpl(parser,resolver); 56 } 57 public Constructor createConstructor(final Composer composer) { 58 return new ConstructorImpl(composer); 59 } 60 61 public Emitter createEmitter(final OutputStream output, final YAMLConfig cfg) { 62 return new EmitterImpl(output,cfg); 63 } 64 public Serializer createSerializer(final Emitter emitter, final Resolver resolver, final YAMLConfig cfg) { 65 return new SerializerImpl(emitter,resolver,cfg); 66 } 67 public Representer createRepresenter(final Serializer serializer, final YAMLConfig cfg) { 68 return new RepresenterImpl(serializer,cfg); 69 } 70 71 } | Popular Tags |