Interface Config.SectionParser<T>

Type Parameters:
T - type of the application model created by the parser.
All Known Implementing Classes:
MergeConfig.MergeConfigSectionParser
Enclosing class:
Config

public static interface Config.SectionParser<T>
Parses a section of the configuration into an application model object.

Instances must implement hashCode and equals such that model objects can be cached by using the SectionParser as a key of a HashMap.

As the SectionParser itself is used as the key of the internal HashMap applications should be careful to ensure the SectionParser key does not retain unnecessary application state which may cause memory to be held longer than expected.

  • Method Summary

    Modifier and Type
    Method
    Description
    Create a model object from a configuration.
  • Method Details

    • parse

      T parse(Config cfg)
      Create a model object from a configuration.
      Parameters:
      cfg - the configuration to read values from.
      Returns:
      the application model instance.