Class ForgeConfigSpec

  • All Implemented Interfaces:
    com.electronwill.nightconfig.core.UnmodifiableConfig

    public class ForgeConfigSpec
    extends com.electronwill.nightconfig.core.utils.UnmodifiableConfigWrapper<com.electronwill.nightconfig.core.UnmodifiableConfig>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private com.electronwill.nightconfig.core.Config childConfig  
      private static com.google.common.base.Joiner DOT_JOINER  
      private static com.google.common.base.Splitter DOT_SPLITTER  
      private boolean isCorrecting  
      private java.util.Map<java.util.List<java.lang.String>,​java.lang.String> levelComments  
      private static com.google.common.base.Joiner LINE_JOINER  
      private com.electronwill.nightconfig.core.UnmodifiableConfig values  
      • Fields inherited from class com.electronwill.nightconfig.core.utils.UnmodifiableConfigWrapper

        config
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private ForgeConfigSpec​(com.electronwill.nightconfig.core.UnmodifiableConfig storage, com.electronwill.nightconfig.core.UnmodifiableConfig values, java.util.Map<java.util.List<java.lang.String>,​java.lang.String> levelComments)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void afterReload()  
      int correct​(com.electronwill.nightconfig.core.CommentedConfig config)  
      int correct​(com.electronwill.nightconfig.core.CommentedConfig config, com.electronwill.nightconfig.core.ConfigSpec.CorrectionListener listener)  
      int correct​(com.electronwill.nightconfig.core.CommentedConfig config, com.electronwill.nightconfig.core.ConfigSpec.CorrectionListener listener, com.electronwill.nightconfig.core.ConfigSpec.CorrectionListener commentListener)  
      private int correct​(com.electronwill.nightconfig.core.UnmodifiableConfig spec, com.electronwill.nightconfig.core.CommentedConfig config, java.util.LinkedList<java.lang.String> parentPath, java.util.List<java.lang.String> parentPathUnmodifiable, com.electronwill.nightconfig.core.ConfigSpec.CorrectionListener listener, com.electronwill.nightconfig.core.ConfigSpec.CorrectionListener commentListener, boolean dryRun)  
      com.electronwill.nightconfig.core.UnmodifiableConfig getSpec()  
      com.electronwill.nightconfig.core.UnmodifiableConfig getValues()  
      boolean isCorrect​(com.electronwill.nightconfig.core.CommentedConfig config)  
      boolean isCorrecting()  
      boolean isLoaded()  
      private void resetCaches​(java.lang.Iterable<java.lang.Object> configValues)  
      void save()  
      void setConfig​(com.electronwill.nightconfig.core.CommentedConfig config)  
      private static java.util.List<java.lang.String> split​(java.lang.String path)  
      private boolean stringsMatchIgnoringNewlines​(java.lang.Object obj1, java.lang.Object obj2)  
      • Methods inherited from class com.electronwill.nightconfig.core.utils.UnmodifiableConfigWrapper

        configFormat, contains, entrySet, equals, getRaw, hashCode, isEmpty, size, valueMap
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface com.electronwill.nightconfig.core.UnmodifiableConfig

        apply, apply, contains, get, get, getByte, getByte, getByteOrElse, getByteOrElse, getChar, getChar, getCharOrElse, getCharOrElse, getEnum, getEnum, getEnum, getEnum, getEnumOrElse, getEnumOrElse, getEnumOrElse, getEnumOrElse, getEnumOrElse, getEnumOrElse, getEnumOrElse, getEnumOrElse, getInt, getInt, getIntOrElse, getIntOrElse, getIntOrElse, getIntOrElse, getLong, getLong, getLongOrElse, getLongOrElse, getLongOrElse, getLongOrElse, getOptional, getOptional, getOptionalEnum, getOptionalEnum, getOptionalEnum, getOptionalEnum, getOptionalInt, getOptionalInt, getOptionalLong, getOptionalLong, getOrElse, getOrElse, getOrElse, getOrElse, getRaw, getShort, getShort, getShortOrElse, getShortOrElse, isNull, isNull
    • Field Detail

      • levelComments

        private java.util.Map<java.util.List<java.lang.String>,​java.lang.String> levelComments
      • values

        private com.electronwill.nightconfig.core.UnmodifiableConfig values
      • childConfig

        private com.electronwill.nightconfig.core.Config childConfig
      • isCorrecting

        private boolean isCorrecting
      • LINE_JOINER

        private static final com.google.common.base.Joiner LINE_JOINER
      • DOT_JOINER

        private static final com.google.common.base.Joiner DOT_JOINER
      • DOT_SPLITTER

        private static final com.google.common.base.Splitter DOT_SPLITTER
    • Constructor Detail

      • ForgeConfigSpec

        private ForgeConfigSpec​(com.electronwill.nightconfig.core.UnmodifiableConfig storage,
                                com.electronwill.nightconfig.core.UnmodifiableConfig values,
                                java.util.Map<java.util.List<java.lang.String>,​java.lang.String> levelComments)
    • Method Detail

      • setConfig

        public void setConfig​(com.electronwill.nightconfig.core.CommentedConfig config)
      • isCorrecting

        public boolean isCorrecting()
      • isLoaded

        public boolean isLoaded()
      • getSpec

        public com.electronwill.nightconfig.core.UnmodifiableConfig getSpec()
      • getValues

        public com.electronwill.nightconfig.core.UnmodifiableConfig getValues()
      • afterReload

        public void afterReload()
      • resetCaches

        private void resetCaches​(java.lang.Iterable<java.lang.Object> configValues)
      • save

        public void save()
      • isCorrect

        public boolean isCorrect​(com.electronwill.nightconfig.core.CommentedConfig config)
      • correct

        public int correct​(com.electronwill.nightconfig.core.CommentedConfig config)
      • correct

        public int correct​(com.electronwill.nightconfig.core.CommentedConfig config,
                           com.electronwill.nightconfig.core.ConfigSpec.CorrectionListener listener)
      • correct

        public int correct​(com.electronwill.nightconfig.core.CommentedConfig config,
                           com.electronwill.nightconfig.core.ConfigSpec.CorrectionListener listener,
                           com.electronwill.nightconfig.core.ConfigSpec.CorrectionListener commentListener)
      • correct

        private int correct​(com.electronwill.nightconfig.core.UnmodifiableConfig spec,
                            com.electronwill.nightconfig.core.CommentedConfig config,
                            java.util.LinkedList<java.lang.String> parentPath,
                            java.util.List<java.lang.String> parentPathUnmodifiable,
                            com.electronwill.nightconfig.core.ConfigSpec.CorrectionListener listener,
                            com.electronwill.nightconfig.core.ConfigSpec.CorrectionListener commentListener,
                            boolean dryRun)
      • stringsMatchIgnoringNewlines

        private boolean stringsMatchIgnoringNewlines​(@Nullable
                                                     java.lang.Object obj1,
                                                     @Nullable
                                                     java.lang.Object obj2)
      • split

        private static java.util.List<java.lang.String> split​(java.lang.String path)