Class YamlLoader
- java.lang.Object
-
- app.coronawarn.server.services.distribution.assembly.appconfig.YamlLoader
-
public class YamlLoader extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T extends com.google.protobuf.Message.Builder>
TloadYamlIntoProtobufBuilder(String path, Class<T> builderType)
Returns a protobufmessage builder
of the specified type, whose fields have been set to the corresponding values from the yaml file at the specified path.
-
-
-
Method Detail
-
loadYamlIntoProtobufBuilder
public static <T extends com.google.protobuf.Message.Builder> T loadYamlIntoProtobufBuilder(String path, Class<T> builderType) throws UnableToLoadFileException
Returns a protobufmessage 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 specificMessage.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.
-
-