org.yaml.snakeyaml.constructor
Class Constructor

java.lang.Object
  extended by org.yaml.snakeyaml.constructor.BaseConstructor
      extended by org.yaml.snakeyaml.constructor.SafeConstructor
          extended by org.yaml.snakeyaml.constructor.Constructor

public class Constructor
extends SafeConstructor

See Also:
PyYAML for more information

Nested Class Summary
protected  class Constructor.ConstructScalar
          Construct scalar instance when the runtime class is known.
 
Field Summary
 
Fields inherited from class org.yaml.snakeyaml.constructor.SafeConstructor
undefinedConstructor
 
Fields inherited from class org.yaml.snakeyaml.constructor.BaseConstructor
rootType, yamlClassConstructors, yamlConstructors
 
Constructor Summary
Constructor()
           
Constructor(Class<? extends Object> theRoot)
           
Constructor(String theRoot)
          Create Constructor for a class which does not have to be in the classpath or for a definition from a Spring ApplicationContext.
 
Method Summary
 TypeDescription addTypeDescription(TypeDescription definition)
          Make YAML aware how to parse a custom Class.
protected  Class<?> getClassForNode(Node node)
           
 
Methods inherited from class org.yaml.snakeyaml.constructor.SafeConstructor
constructMapping2ndStep, constructSet2ndStep
 
Methods inherited from class org.yaml.snakeyaml.constructor.BaseConstructor
callConstructor, callPostCreate, checkData, constructMapping, constructObject, constructScalar, constructSequence, constructSequenceStep2, constructSet, createDefaultList, createDefaultMap, createDefaultSet, getData, getSingleData, setComposer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Constructor

public Constructor()

Constructor

public Constructor(Class<? extends Object> theRoot)

Constructor

public Constructor(String theRoot)
            throws ClassNotFoundException
Create Constructor for a class which does not have to be in the classpath or for a definition from a Spring ApplicationContext.

Parameters:
theRoot - fully qualified class name of the root JavaBean
Throws:
ClassNotFoundException
Method Detail

addTypeDescription

public TypeDescription addTypeDescription(TypeDescription definition)
Make YAML aware how to parse a custom Class. If there is no root Class assigned in constructor then the 'root' property of this definition is respected.

Parameters:
definition - to be added to the Constructor
Returns:
the previous value associated with definition, or null if there was no mapping for definition.

getClassForNode

protected Class<?> getClassForNode(Node node)


Copyright © 2008-2009. All Rights Reserved.