Examples of addTypeDescription()


Examples of org.yaml.snakeyaml.constructor.Constructor.addTypeDescription()

      nodeDesc.putListPropertyType("tags", String.class);
      constructor.addTypeDescription(nodeDesc);

      TypeDescription configDesc = new TypeDescription(Config.class);
      configDesc.putListPropertyType("nodes", YamlNode.class);
      constructor.addTypeDescription(configDesc);
      // note that snakeyaml also throws nosuchmethod error when you use the
      // non-deprecated
      // constructor
      Yaml yaml = new Yaml(new Loader(constructor));
      Config config;
View Full Code Here

Examples of org.yaml.snakeyaml.extensions.compactnotation.CompactConstructor.addTypeDescription()

    // Add !tag
    for (Entry<String, ClassMetadata> entry : metadata.entrySet()) {
      ClassMetadata cmetadata = entry.getValue();
      Class<?> mappedClass = cmetadata.getMappedClass();
      String tag = "!!" + mappedClass.getSimpleName();
      constructor.addTypeDescription(new TypeDescription(mappedClass, tag));
    }
    return new Yaml(constructor);
  }
}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.