// Collection of code snippets by Arne Vajhøj 
// (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) 
package yamlproc;

import java.io.FileReader;
import java.io.IOException;

import com.esotericsoftware.yamlbeans.YamlReader;

public class BeansBindCode {
    public static void main(String[] args) throws IOException {
        YamlReader parser = new YamlReader(new FileReader("/work/demo1.yaml"));
        Config cfg = parser.read(Config.class);
        int a = cfg.getAb().getA();
        int b = cfg.getAb().getB();
        int c = cfg.getC();
        String d = cfg.getDe().getD();
        String e = cfg.getDe().getE();
        String f = cfg.getF();
        System.out.printf("%d %d %d %s %s %s\n", a, b, c, d, e, f);
    }
}
