Class MapConfigLoader

  • All Implemented Interfaces:
    ConfigLoader

    public final class MapConfigLoader
    extends java.lang.Object
    implements ConfigLoader
    Loads an in memory map from MapConfigSource.
    • Constructor Summary

      Constructors 
      Constructor Description
      MapConfigLoader()
      Construct a default Map Config loader using the default path lexer for "." separated paths.
      MapConfigLoader​(SentenceLexer lexer, ConfigParser parser)
      Construct a Map Config loader providing a lexer and a config parser.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean accepts​(java.lang.String format)
      True if the config loader accepts the format.
      GResultOf<java.util.List<ConfigNodeContainer>> loadSource​(ConfigSource source)
      Load a ConfigSource then build the validated config node.
      java.lang.String name()
      Name of the config loader.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MapConfigLoader

        public MapConfigLoader()
        Construct a default Map Config loader using the default path lexer for "." separated paths.
      • MapConfigLoader

        public MapConfigLoader​(SentenceLexer lexer,
                               ConfigParser parser)
        Construct a Map Config loader providing a lexer and a config parser.
        Parameters:
        lexer - SentenceLexer to create tokens for the path.
        parser - Parser for the Map Config files
    • Method Detail

      • name

        public java.lang.String name()
        Description copied from interface: ConfigLoader
        Name of the config loader.
        Specified by:
        name in interface ConfigLoader
        Returns:
        name
      • accepts

        public boolean accepts​(java.lang.String format)
        Description copied from interface: ConfigLoader
        True if the config loader accepts the format.
        Specified by:
        accepts in interface ConfigLoader
        Parameters:
        format - config format.
        Returns:
        True if the config loader accepts the format.