org.springframework.boot.bind

Class YamlJavaBeanPropertyConstructor

  • java.lang.Object
    • org.yaml.snakeyaml.constructor.BaseConstructor
      • org.yaml.snakeyaml.constructor.SafeConstructor
        • org.yaml.snakeyaml.constructor.Constructor
          • org.springframework.boot.bind.YamlJavaBeanPropertyConstructor


  • public class YamlJavaBeanPropertyConstructor
    extends org.yaml.snakeyaml.constructor.Constructor
    Extended version of snakeyaml's Constructor class to facilitate mapping custom YAML keys to Javabean property names.
    Author:
    Luke Taylor
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.yaml.snakeyaml.constructor.Constructor

        org.yaml.snakeyaml.constructor.Constructor.ConstructMapping, org.yaml.snakeyaml.constructor.Constructor.ConstructScalar, org.yaml.snakeyaml.constructor.Constructor.ConstructSequence, org.yaml.snakeyaml.constructor.Constructor.ConstructYamlObject
      • Nested classes/interfaces inherited from class org.yaml.snakeyaml.constructor.SafeConstructor

        org.yaml.snakeyaml.constructor.SafeConstructor.ConstructUndefined, org.yaml.snakeyaml.constructor.SafeConstructor.ConstructYamlBinary, org.yaml.snakeyaml.constructor.SafeConstructor.ConstructYamlBool, org.yaml.snakeyaml.constructor.SafeConstructor.ConstructYamlFloat, org.yaml.snakeyaml.constructor.SafeConstructor.ConstructYamlInt, org.yaml.snakeyaml.constructor.SafeConstructor.ConstructYamlMap, org.yaml.snakeyaml.constructor.SafeConstructor.ConstructYamlNull, org.yaml.snakeyaml.constructor.SafeConstructor.ConstructYamlNumber, org.yaml.snakeyaml.constructor.SafeConstructor.ConstructYamlOmap, org.yaml.snakeyaml.constructor.SafeConstructor.ConstructYamlPairs, org.yaml.snakeyaml.constructor.SafeConstructor.ConstructYamlSeq, org.yaml.snakeyaml.constructor.SafeConstructor.ConstructYamlSet, org.yaml.snakeyaml.constructor.SafeConstructor.ConstructYamlStr, org.yaml.snakeyaml.constructor.SafeConstructor.ConstructYamlTimestamp
    • Field Summary

      • Fields inherited from class org.yaml.snakeyaml.constructor.Constructor

        typeDefinitions
      • Fields inherited from class org.yaml.snakeyaml.constructor.SafeConstructor

        undefinedConstructor
      • Fields inherited from class org.yaml.snakeyaml.constructor.BaseConstructor

        rootTag, yamlClassConstructors, yamlConstructors, yamlMultiConstructors
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      protected void addPropertyAlias(String alias, Class<?> type, String name)
      Adds an alias for a Javabean property name on a particular type.
      • Methods inherited from class org.yaml.snakeyaml.constructor.Constructor

        addTypeDescription, getClassForName, getClassForNode
      • Methods inherited from class org.yaml.snakeyaml.constructor.SafeConstructor

        constructMapping2ndStep, constructSet2ndStep, flattenMapping
      • Methods inherited from class org.yaml.snakeyaml.constructor.BaseConstructor

        checkData, constructArray, constructArrayStep2, constructMapping, constructObject, constructScalar, constructSequence, constructSequenceStep2, constructSet, constructSet, createArray, createDefaultList, createDefaultMap, createDefaultSet, createDefaultSet, getConstructor, getData, getPropertyUtils, getSingleData, isExplicitPropertyUtils, setComposer, setPropertyUtils
    • Constructor Detail

      • YamlJavaBeanPropertyConstructor

        public YamlJavaBeanPropertyConstructor(Class<?> theRoot)
      • YamlJavaBeanPropertyConstructor

        public YamlJavaBeanPropertyConstructor(Class<?> theRoot,
                                       Map<Class<?>,Map<String,String>> propertyAliases)
    • Method Detail

      • addPropertyAlias

        protected final void addPropertyAlias(String alias,
                            Class<?> type,
                            String name)
        Adds an alias for a Javabean property name on a particular type. The values of YAML keys with the alias name will be mapped to the Javabean property.
        Parameters:
        alias - the alias to map
        type - the type of property
        name - the property name

Copyright © 2014 Pivotal Software, Inc.. All rights reserved.