VitalConfig
Defines a config within the Vital-Framework. A config class defines the structure and datatypes of a singular configuration file stored on the filesystem. It's data can be loaded from the filesystem into the class to expose a developer-friendly api to access it.
Each field annotated with VitalConfig.Property will be defined as a valid property for serialization and deserialization.
The consuming class must be annotated with VitalConfig.Info.
@VitalConfig.Info(
name = "my-vital-config.yaml",
processor = VitalYAMLConfigProcessor.class
)
public class MyVitalConfig extends VitalConfig {
@Property(types = {String.class})
private String myString;
@Property(types = {String.class})
private List<String> myStringList;
@Property(types = {String.class, Long.class})
private Map<String, Long> myStringLongMap;
}Types
Defines the info for a VitalConfig.
Defines a processor that can serialize and deserialize content for a VitalConfig. Implementation classes should be used in Info.processor.
This annotation marks a Field as a property that can automatically be injected by a VitalConfig. Use this annotation inside a VitalConfig implementer or any other class than is used as a value in a VitalConfig implementer.
Functions
Loads this config from the given inputStream. This function will load the serialized content via the defined Info.processor and initialize this class's fields.