org.yaml.snakeyaml
Class JavaBeanDumper

java.lang.Object
  extended by org.yaml.snakeyaml.JavaBeanDumper

public class JavaBeanDumper
extends Object

Convenience utility to serialize JavaBeans.


Constructor Summary
JavaBeanDumper()
          Create Dumper for JavaBeans.
JavaBeanDumper(BeanAccess beanAccess)
           
JavaBeanDumper(boolean useGlobalTag)
           
JavaBeanDumper(boolean useGlobalTag, BeanAccess beanAccess)
          Create Dumper for JavaBeans
JavaBeanDumper(Representer representer, DumperOptions options)
           
 
Method Summary
 String dump(Object data)
          Serialize JavaBean
 void dump(Object data, Writer output)
          Serialize JavaBean
 DumperOptions.FlowStyle getFlowStyle()
           
 boolean isUseGlobalTag()
           
 void setFlowStyle(DumperOptions.FlowStyle flowStyle)
           
 void setMapTagForBean(Class<? extends Object> clazz)
          Skip global tag with the specified class in a type-safe collection
 void setUseGlobalTag(boolean useGlobalTag)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaBeanDumper

public JavaBeanDumper(boolean useGlobalTag,
                      BeanAccess beanAccess)
Create Dumper for JavaBeans

Parameters:
useGlobalTag - true to emit the global tag with the class name

JavaBeanDumper

public JavaBeanDumper(boolean useGlobalTag)

JavaBeanDumper

public JavaBeanDumper(BeanAccess beanAccess)

JavaBeanDumper

public JavaBeanDumper()
Create Dumper for JavaBeans. Use "tag:yaml.org,2002:map" as the root tag.


JavaBeanDumper

public JavaBeanDumper(Representer representer,
                      DumperOptions options)
Method Detail

dump

public void dump(Object data,
                 Writer output)
Serialize JavaBean

Parameters:
data - JavaBean instance to serialize
output - destination

dump

public String dump(Object data)
Serialize JavaBean

Parameters:
data - JavaBean instance to serialize
Returns:
serialized YAML document

isUseGlobalTag

public boolean isUseGlobalTag()

setUseGlobalTag

public void setUseGlobalTag(boolean useGlobalTag)

getFlowStyle

public DumperOptions.FlowStyle getFlowStyle()

setFlowStyle

public void setFlowStyle(DumperOptions.FlowStyle flowStyle)

setMapTagForBean

public void setMapTagForBean(Class<? extends Object> clazz)
Skip global tag with the specified class in a type-safe collection

Parameters:
clazz - JavaBean Class to represent as Map


Copyright © 2008-2010. All Rights Reserved.