Class YamlLoader


  • public class YamlLoader
    extends Object
    • Method Detail

      • loadYamlIntoProtobufBuilder

        public static <T extends com.google.protobuf.Message.Builder> T loadYamlIntoProtobufBuilder​(String path,
                                                                                                    Class<T> builderType)
                                                                                             throws UnableToLoadFileException
        Returns a protobuf message builder of the specified type, whose fields have been set to the corresponding values from the yaml file at the specified path.
        Parameters:
        path - The absolute path of the yaml file within the class path.
        builderType - The specific Message.Builder implementation that will be returned.
        Returns:
        A prepared protobuf message builder of the specified type.
        Throws:
        UnableToLoadFileException - if either the file access or subsequent yaml parsing fails.