Class YamlFormat

All Implemented Interfaces:
Configuration

public class YamlFormat extends AbstractFormat
解析YAML格式的内容 Parse content in YAML format
Author:
sunweisheng
  • Constructor Details

    • YamlFormat

      public YamlFormat(String yamlContent) throws Exception
      构造函数 Constructor
      Parameters:
      yamlContent - YAML格式内容 YAML format content
      Throws:
      Exception - 父类加载数据时或转化结构时可能抛出异常 Exceptions may be thrown when the parent class loads data or transforms structures
    • YamlFormat

      public YamlFormat(InputStream inputStream) throws Exception
      构造函数 Constructor
      Parameters:
      inputStream - YAML格式文件的流对象 Stream object of YAML format file
      Throws:
      Exception - 父类加载数据时或转化结构时可能抛出异常 Exceptions may be thrown when the parent class loads data or transforms structures
  • Method Details

    • loadData

      protected LinkedHashMap<String,Object> loadData()
      加载YAML内容并结构化为LinkedHashMap Load YAML content and structure it as LinkedHashMap
      Specified by:
      loadData in class AbstractFormat
      Returns:
      YAML内容的LinkedHashMap结构 LinkedHashMap structure of YAML content