Examples of TypeDescription


Examples of org.yaml.snakeyaml.TypeDescription

            } catch (IOException e) {
                // getStorageConfigURL should have ruled this out
                throw new AssertionError(e);
            }
            Constructor constructor = new Constructor(CassandraConfig.class);
            TypeDescription seedDesc = new TypeDescription(SeedProviderDef.class);
            seedDesc.putMapPropertyType("parameters", String.class, String.class);
            constructor.addTypeDescription(seedDesc);
            Yaml yaml = new Yaml(constructor);
            config = (CassandraConfig) yaml.load(input);
        } catch (YAMLException e) {
            throw new ConfigurationException("Invalid yaml", e);
View Full Code Here

Examples of org.yaml.snakeyaml.TypeDescription

public class Parser {

    public Stacks parse(InputStream is) {
        CustomClassloaderConstructor constructor = new CustomClassloaderConstructor(StacksImpl.class, this.getClass()
                .getClassLoader());
        TypeDescription stackDescription = new TypeDescription(StacksImpl.class);
        stackDescription.putListPropertyType("availableBoms", BomImpl.class);
        stackDescription.putListPropertyType("availableBomVersions", BomVersionImpl.class);
        stackDescription.putListPropertyType("availableRuntimes", RuntimeImpl.class);
        stackDescription.putListPropertyType("availableArchetypes", ArchetypeImpl.class);
        stackDescription.putListPropertyType("availableArchetypeVersions", ArchetypeVersionImpl.class);
        stackDescription.putListPropertyType("minorReleases", MinorReleaseImpl.class);
        stackDescription.putListPropertyType("majorReleases", MajorReleaseImpl.class);
  
        constructor.addTypeDescription(stackDescription);
        Yaml yaml = new Yaml(constructor);
        Stacks data = (Stacks) yaml.load(is);
        return data;
View Full Code Here

Examples of org.yaml.snakeyaml.TypeDescription

            {
                // getStorageConfigURL should have ruled this out
                throw new AssertionError(e);
            }
            org.yaml.snakeyaml.constructor.Constructor constructor = new org.yaml.snakeyaml.constructor.Constructor(Config.class);
            TypeDescription seedDesc = new TypeDescription(SeedProviderDef.class);
            seedDesc.putMapPropertyType("parameters", String.class, String.class);
            constructor.addTypeDescription(seedDesc);
            Yaml yaml = new Yaml(new Loader(constructor));
            conf = (Config)yaml.load(input);

            logger.info("Data files directories: " + Arrays.toString(conf.data_file_directories));
View Full Code Here

Examples of org.yaml.snakeyaml.TypeDescription

        assert is != null;

        try
        {
            final Constructor constructor = new Constructor(NodeToolHelp.class);
            TypeDescription desc = new TypeDescription(NodeToolHelp.class);
            desc.putListPropertyType("commands", NodeToolHelp.NodeToolCommand.class);
            final Yaml yaml = new Yaml(new Loader(constructor));
            return (NodeToolHelp)yaml.load(is);
        }
        finally
        {
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.