net.sourceforge.yamlbeans
Class YamlConfig

java.lang.Object
  extended by net.sourceforge.yamlbeans.YamlConfig

public class YamlConfig
extends java.lang.Object

Stores configuration for reading and writing YAML.


Nested Class Summary
static class YamlConfig.ReadConfig
           
static class YamlConfig.WriteConfig
           
 
Field Summary
 YamlConfig.ReadConfig readConfig
          Configuration for reading YAML.
 YamlConfig.WriteConfig writeConfig
          Configuration for writing YAML.
 
Constructor Summary
YamlConfig()
           
 
Method Summary
 void setBeanProperties(boolean beanProperties)
          If true, bean properties with both a getter and setter will be used.
 void setClassTag(java.lang.String tag, java.lang.Class type)
          Allows the specified tag to be used in YAML instead of the full class name.
 void setPrivateFields(boolean privateFields)
          If true, private non-transient fields will be used.
 void setPropertyDefaultType(java.lang.Class type, java.lang.String propertyName, java.lang.Class defaultType)
          Sets the default type of a property.
 void setPropertyElementType(java.lang.Class type, java.lang.String propertyName, java.lang.Class elementType)
          Sets the default type of elements in a Collection or Map property.
 void setScalarSerializer(java.lang.Class type, ScalarSerializer serializer)
          Adds a serializer for the specified scalar type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

writeConfig

public final YamlConfig.WriteConfig writeConfig
Configuration for writing YAML.


readConfig

public final YamlConfig.ReadConfig readConfig
Configuration for reading YAML.

Constructor Detail

YamlConfig

public YamlConfig()
Method Detail

setClassTag

public void setClassTag(java.lang.String tag,
                        java.lang.Class type)
Allows the specified tag to be used in YAML instead of the full class name.


setScalarSerializer

public void setScalarSerializer(java.lang.Class type,
                                ScalarSerializer serializer)
Adds a serializer for the specified scalar type.


setPropertyElementType

public void setPropertyElementType(java.lang.Class type,
                                   java.lang.String propertyName,
                                   java.lang.Class elementType)
Sets the default type of elements in a Collection or Map property. No tag will be output for elements of this type. This type will be used for each element if no tag is found.


setPropertyDefaultType

public void setPropertyDefaultType(java.lang.Class type,
                                   java.lang.String propertyName,
                                   java.lang.Class defaultType)
Sets the default type of a property. No tag will be output for values of this type. This type will be used if no tag is found.


setBeanProperties

public void setBeanProperties(boolean beanProperties)
If true, bean properties with both a getter and setter will be used. Default is true.


setPrivateFields

public void setPrivateFields(boolean privateFields)
If true, private non-transient fields will be used. Default is false.