title: Parse YAML files without writing java classes in prior
body: <p>I want to write a YAML parser in Java which is able to parse different formats of YAML files. Typically, one would analyze the YAML and write respective java classes for mapping them via Jackson. However, I want to have a pluggable architecture and think of an approach which allows to generate adapters for certain YAML schemas. An optimal solution would be to generate the needed java classes directly when reading the YAML.</p>
  
  <p>Is that possible in any way?</p>
  
  <p>Edit:
  I re-thought my problem and came to the solution that reading the YAML file and writing it into a hashmap is the most suitable way to work around it without writing static java classes for each format, I want to accept.</p>
  
  <pre><code>Yaml yaml = new Yaml();
  InputStream inputStream = this.getClass()
      .getClassLoader()
      .getResourceAsStream("templates/template.yml");
  Map&lt;String, Object&gt; templateMap = yaml.load(inputStream);
  </code></pre>