From b16fe13308c9e13267613e2403a26d4f6b0bc5ef Mon Sep 17 00:00:00 2001 From: Spongie Date: Sat, 11 Nov 2023 04:09:02 +0000 Subject: [PATCH] Publishing javadoc for SpongePowered/Configurate 4.2.0-SNAPSHOT --- .../4.2.0-SNAPSHOT/member-search-index.zip | Bin 493 -> 493 bytes .../hocon/HoconConfigurationLoader.html | 2 +- .../4.2.0-SNAPSHOT/package-search-index.zip | Bin 250 -> 250 bytes .../HoconConfigurationLoader.Builder.html | 141 ++++++++++-------- .../hocon/HoconConfigurationLoader.html | 141 ++++++++++-------- .../4.2.0-SNAPSHOT/type-search-index.zip | Bin 280 -> 280 bytes 6 files changed, 151 insertions(+), 133 deletions(-) diff --git a/configurate/hocon/4.2.0-SNAPSHOT/member-search-index.zip b/configurate/hocon/4.2.0-SNAPSHOT/member-search-index.zip index 83c1fbb61ab3ab684d20aab5ce40ee8adca6ff67..694c7df8980a494ac18b2ee4da28e774b9672fa6 100644 GIT binary patch delta 28 kcmaFM{Fa#~z?+#xgn@&DgJFTfMxKd`ObZky&u8=l0A#)g4FCWD delta 28 kcmaFM{Fa#~z?+#xgn@&DgW;I$MxKd`Ovhv=&u8=l0B2nXQvd(} diff --git a/configurate/hocon/4.2.0-SNAPSHOT/org/spongepowered/configurate/hocon/HoconConfigurationLoader.html b/configurate/hocon/4.2.0-SNAPSHOT/org/spongepowered/configurate/hocon/HoconConfigurationLoader.html index 648a3d66c..7721ea10c 100644 --- a/configurate/hocon/4.2.0-SNAPSHOT/org/spongepowered/configurate/hocon/HoconConfigurationLoader.html +++ b/configurate/hocon/4.2.0-SNAPSHOT/org/spongepowered/configurate/hocon/HoconConfigurationLoader.html @@ -356,7 +356,7 @@

saveInternal

diff --git a/configurate/hocon/4.2.0-SNAPSHOT/package-search-index.zip b/configurate/hocon/4.2.0-SNAPSHOT/package-search-index.zip index 2bbc5a1a385016639bf66ff44544d5e0ea958dd3..78f8fcf112b23354e992a3d07e0b6ad3603bec9b 100644 GIT binary patch delta 26 gcmeyx_=}Mzz?+#xgn@&DgJFTfM4q`!KytM|09v017ytkO delta 26 gcmeyx_=}Mzz?+#xgn@&DgW;I$M4q`!KytM|09@4vUH||9 diff --git a/configurate/hocon/4.2.0-SNAPSHOT/src-html/org/spongepowered/configurate/hocon/HoconConfigurationLoader.Builder.html b/configurate/hocon/4.2.0-SNAPSHOT/src-html/org/spongepowered/configurate/hocon/HoconConfigurationLoader.Builder.html index 062974818..6571a4d77 100644 --- a/configurate/hocon/4.2.0-SNAPSHOT/src-html/org/spongepowered/configurate/hocon/HoconConfigurationLoader.Builder.html +++ b/configurate/hocon/4.2.0-SNAPSHOT/src-html/org/spongepowered/configurate/hocon/HoconConfigurationLoader.Builder.html @@ -35,26 +35,26 @@ 026import com.typesafe.config.ConfigRenderOptions; 027import com.typesafe.config.ConfigValue; 028import com.typesafe.config.ConfigValueFactory; -029import org.checkerframework.checker.nullness.qual.Nullable; -030import org.spongepowered.configurate.CommentedConfigurationNode; -031import org.spongepowered.configurate.CommentedConfigurationNodeIntermediary; -032import org.spongepowered.configurate.ConfigurateException; -033import org.spongepowered.configurate.ConfigurationNode; -034import org.spongepowered.configurate.ConfigurationOptions; -035import org.spongepowered.configurate.loader.AbstractConfigurationLoader; -036import org.spongepowered.configurate.loader.CommentHandler; -037import org.spongepowered.configurate.loader.CommentHandlers; -038import org.spongepowered.configurate.loader.LoaderOptionSource; -039import org.spongepowered.configurate.loader.ParsingException; -040import org.spongepowered.configurate.util.UnmodifiableCollections; -041 -042import java.io.BufferedReader; -043import java.io.IOException; -044import java.io.Writer; -045import java.lang.reflect.Constructor; -046import java.lang.reflect.InvocationTargetException; -047import java.util.ArrayList; -048import java.util.Arrays; +029import com.typesafe.config.impl.ConfigNodeComment; +030import org.checkerframework.checker.nullness.qual.Nullable; +031import org.spongepowered.configurate.CommentedConfigurationNode; +032import org.spongepowered.configurate.CommentedConfigurationNodeIntermediary; +033import org.spongepowered.configurate.ConfigurateException; +034import org.spongepowered.configurate.ConfigurationNode; +035import org.spongepowered.configurate.ConfigurationOptions; +036import org.spongepowered.configurate.loader.AbstractConfigurationLoader; +037import org.spongepowered.configurate.loader.CommentHandler; +038import org.spongepowered.configurate.loader.CommentHandlers; +039import org.spongepowered.configurate.loader.LoaderOptionSource; +040import org.spongepowered.configurate.loader.ParsingException; +041import org.spongepowered.configurate.util.UnmodifiableCollections; +042 +043import java.io.BufferedReader; +044import java.io.IOException; +045import java.io.Writer; +046import java.lang.reflect.Constructor; +047import java.lang.reflect.InvocationTargetException; +048import java.util.ArrayList; 049import java.util.Collections; 050import java.util.List; 051import java.util.Map; @@ -227,7 +227,7 @@ 218 if (!value.origin().comments().isEmpty()) { 219 node.comment(value.origin().comments().stream() 220 .map(input -> { -221 final String lineStripped = input.replace("\r", ""); +221 final String lineStripped = input.commentText().replace("\r", ""); 222 if (!lineStripped.isEmpty() && lineStripped.charAt(0) == ' ') { 223 return lineStripped.substring(1); 224 } else { @@ -303,60 +303,69 @@ 294 final CommentedConfigurationNodeIntermediary<?> commentedNode = (CommentedConfigurationNodeIntermediary<?>) node; 295 final @Nullable String origComment = commentedNode.comment(); 296 if (origComment != null) { -297 ret = ret.withOrigin(ret.origin().withComments(Arrays.asList(CONFIGURATE_LINE_PATTERN.split(origComment)))); -298 } -299 } -300 return ret; -301 } -302 -303 static ConfigValue newConfigObject(final Map<String, ConfigValue> vals) { -304 try { -305 return CONFIG_OBJECT_CONSTRUCTOR.newInstance(CONFIGURATE_ORIGIN, vals); -306 } catch (InstantiationException | IllegalAccessException | InvocationTargetException e) { -307 throw new RuntimeException(e); // rethrow +297 final List<ConfigNodeComment> nodes = new ArrayList<>(); +298 for (final String line : CONFIGURATE_LINE_PATTERN.split(origComment, -1)) { +299 if (line.charAt(0) == '#') { +300 // allow lines that are only the comment character, for box drawing +301 nodes.add(ConfigNodeComment.hashComment(line)); +302 } else { +303 nodes.add(ConfigNodeComment.hashComment(' ' + line)); +304 } +305 } +306 ret = ret.withOrigin(ret.origin().withComments(nodes)); +307 } 308 } -309 +309 return ret; 310 } 311 -312 static ConfigValue newConfigList(final List<ConfigValue> vals) { +312 static ConfigValue newConfigObject(final Map<String, ConfigValue> vals) { 313 try { -314 return CONFIG_LIST_CONSTRUCTOR.newInstance(CONFIGURATE_ORIGIN, vals); +314 return CONFIG_OBJECT_CONSTRUCTOR.newInstance(CONFIGURATE_ORIGIN, vals); 315 } catch (InstantiationException | IllegalAccessException | InvocationTargetException e) { 316 throw new RuntimeException(e); // rethrow 317 } -318 } -319 -320 @Override -321 public CommentedConfigurationNode createNode(final ConfigurationOptions options) { -322 return CommentedConfigurationNode.root(options.nativeTypes(NATIVE_TYPES)); -323 } -324 -325 // -- Comment handling -- this might have to be updated as the hocon dep changes -326 // (But tests should detect this breakage) -327 private static final Constructor<? extends ConfigValue> CONFIG_OBJECT_CONSTRUCTOR; -328 private static final Constructor<? extends ConfigValue> CONFIG_LIST_CONSTRUCTOR; -329 -330 static { -331 final Class<? extends ConfigValue> objectClass; -332 final Class<? extends ConfigValue> listClass; -333 try { -334 objectClass = Class.forName("com.typesafe.config.impl.SimpleConfigObject").asSubclass(ConfigValue.class); -335 listClass = Class.forName("com.typesafe.config.impl.SimpleConfigList").asSubclass(ConfigValue.class); -336 } catch (final ClassNotFoundException e) { -337 throw new ExceptionInInitializerError(e); -338 } -339 -340 try { -341 CONFIG_OBJECT_CONSTRUCTOR = objectClass.getDeclaredConstructor(ConfigOrigin.class, Map.class); -342 CONFIG_OBJECT_CONSTRUCTOR.setAccessible(true); -343 CONFIG_LIST_CONSTRUCTOR = listClass.getDeclaredConstructor(ConfigOrigin.class, List.class); -344 CONFIG_LIST_CONSTRUCTOR.setAccessible(true); -345 } catch (final NoSuchMethodException e) { +318 +319 } +320 +321 static ConfigValue newConfigList(final List<ConfigValue> vals) { +322 try { +323 return CONFIG_LIST_CONSTRUCTOR.newInstance(CONFIGURATE_ORIGIN, vals); +324 } catch (InstantiationException | IllegalAccessException | InvocationTargetException e) { +325 throw new RuntimeException(e); // rethrow +326 } +327 } +328 +329 @Override +330 public CommentedConfigurationNode createNode(final ConfigurationOptions options) { +331 return CommentedConfigurationNode.root(options.nativeTypes(NATIVE_TYPES)); +332 } +333 +334 // -- Comment handling -- this might have to be updated as the hocon dep changes +335 // (But tests should detect this breakage) +336 private static final Constructor<? extends ConfigValue> CONFIG_OBJECT_CONSTRUCTOR; +337 private static final Constructor<? extends ConfigValue> CONFIG_LIST_CONSTRUCTOR; +338 +339 static { +340 final Class<? extends ConfigValue> objectClass; +341 final Class<? extends ConfigValue> listClass; +342 try { +343 objectClass = Class.forName("com.typesafe.config.impl.SimpleConfigObject").asSubclass(ConfigValue.class); +344 listClass = Class.forName("com.typesafe.config.impl.SimpleConfigList").asSubclass(ConfigValue.class); +345 } catch (final ClassNotFoundException e) { 346 throw new ExceptionInInitializerError(e); 347 } -348 } -349 -350} +348 +349 try { +350 CONFIG_OBJECT_CONSTRUCTOR = objectClass.getDeclaredConstructor(ConfigOrigin.class, Map.class); +351 CONFIG_OBJECT_CONSTRUCTOR.setAccessible(true); +352 CONFIG_LIST_CONSTRUCTOR = listClass.getDeclaredConstructor(ConfigOrigin.class, List.class); +353 CONFIG_LIST_CONSTRUCTOR.setAccessible(true); +354 } catch (final NoSuchMethodException e) { +355 throw new ExceptionInInitializerError(e); +356 } +357 } +358 +359} diff --git a/configurate/hocon/4.2.0-SNAPSHOT/src-html/org/spongepowered/configurate/hocon/HoconConfigurationLoader.html b/configurate/hocon/4.2.0-SNAPSHOT/src-html/org/spongepowered/configurate/hocon/HoconConfigurationLoader.html index 062974818..6571a4d77 100644 --- a/configurate/hocon/4.2.0-SNAPSHOT/src-html/org/spongepowered/configurate/hocon/HoconConfigurationLoader.html +++ b/configurate/hocon/4.2.0-SNAPSHOT/src-html/org/spongepowered/configurate/hocon/HoconConfigurationLoader.html @@ -35,26 +35,26 @@ 026import com.typesafe.config.ConfigRenderOptions; 027import com.typesafe.config.ConfigValue; 028import com.typesafe.config.ConfigValueFactory; -029import org.checkerframework.checker.nullness.qual.Nullable; -030import org.spongepowered.configurate.CommentedConfigurationNode; -031import org.spongepowered.configurate.CommentedConfigurationNodeIntermediary; -032import org.spongepowered.configurate.ConfigurateException; -033import org.spongepowered.configurate.ConfigurationNode; -034import org.spongepowered.configurate.ConfigurationOptions; -035import org.spongepowered.configurate.loader.AbstractConfigurationLoader; -036import org.spongepowered.configurate.loader.CommentHandler; -037import org.spongepowered.configurate.loader.CommentHandlers; -038import org.spongepowered.configurate.loader.LoaderOptionSource; -039import org.spongepowered.configurate.loader.ParsingException; -040import org.spongepowered.configurate.util.UnmodifiableCollections; -041 -042import java.io.BufferedReader; -043import java.io.IOException; -044import java.io.Writer; -045import java.lang.reflect.Constructor; -046import java.lang.reflect.InvocationTargetException; -047import java.util.ArrayList; -048import java.util.Arrays; +029import com.typesafe.config.impl.ConfigNodeComment; +030import org.checkerframework.checker.nullness.qual.Nullable; +031import org.spongepowered.configurate.CommentedConfigurationNode; +032import org.spongepowered.configurate.CommentedConfigurationNodeIntermediary; +033import org.spongepowered.configurate.ConfigurateException; +034import org.spongepowered.configurate.ConfigurationNode; +035import org.spongepowered.configurate.ConfigurationOptions; +036import org.spongepowered.configurate.loader.AbstractConfigurationLoader; +037import org.spongepowered.configurate.loader.CommentHandler; +038import org.spongepowered.configurate.loader.CommentHandlers; +039import org.spongepowered.configurate.loader.LoaderOptionSource; +040import org.spongepowered.configurate.loader.ParsingException; +041import org.spongepowered.configurate.util.UnmodifiableCollections; +042 +043import java.io.BufferedReader; +044import java.io.IOException; +045import java.io.Writer; +046import java.lang.reflect.Constructor; +047import java.lang.reflect.InvocationTargetException; +048import java.util.ArrayList; 049import java.util.Collections; 050import java.util.List; 051import java.util.Map; @@ -227,7 +227,7 @@ 218 if (!value.origin().comments().isEmpty()) { 219 node.comment(value.origin().comments().stream() 220 .map(input -> { -221 final String lineStripped = input.replace("\r", ""); +221 final String lineStripped = input.commentText().replace("\r", ""); 222 if (!lineStripped.isEmpty() && lineStripped.charAt(0) == ' ') { 223 return lineStripped.substring(1); 224 } else { @@ -303,60 +303,69 @@ 294 final CommentedConfigurationNodeIntermediary<?> commentedNode = (CommentedConfigurationNodeIntermediary<?>) node; 295 final @Nullable String origComment = commentedNode.comment(); 296 if (origComment != null) { -297 ret = ret.withOrigin(ret.origin().withComments(Arrays.asList(CONFIGURATE_LINE_PATTERN.split(origComment)))); -298 } -299 } -300 return ret; -301 } -302 -303 static ConfigValue newConfigObject(final Map<String, ConfigValue> vals) { -304 try { -305 return CONFIG_OBJECT_CONSTRUCTOR.newInstance(CONFIGURATE_ORIGIN, vals); -306 } catch (InstantiationException | IllegalAccessException | InvocationTargetException e) { -307 throw new RuntimeException(e); // rethrow +297 final List<ConfigNodeComment> nodes = new ArrayList<>(); +298 for (final String line : CONFIGURATE_LINE_PATTERN.split(origComment, -1)) { +299 if (line.charAt(0) == '#') { +300 // allow lines that are only the comment character, for box drawing +301 nodes.add(ConfigNodeComment.hashComment(line)); +302 } else { +303 nodes.add(ConfigNodeComment.hashComment(' ' + line)); +304 } +305 } +306 ret = ret.withOrigin(ret.origin().withComments(nodes)); +307 } 308 } -309 +309 return ret; 310 } 311 -312 static ConfigValue newConfigList(final List<ConfigValue> vals) { +312 static ConfigValue newConfigObject(final Map<String, ConfigValue> vals) { 313 try { -314 return CONFIG_LIST_CONSTRUCTOR.newInstance(CONFIGURATE_ORIGIN, vals); +314 return CONFIG_OBJECT_CONSTRUCTOR.newInstance(CONFIGURATE_ORIGIN, vals); 315 } catch (InstantiationException | IllegalAccessException | InvocationTargetException e) { 316 throw new RuntimeException(e); // rethrow 317 } -318 } -319 -320 @Override -321 public CommentedConfigurationNode createNode(final ConfigurationOptions options) { -322 return CommentedConfigurationNode.root(options.nativeTypes(NATIVE_TYPES)); -323 } -324 -325 // -- Comment handling -- this might have to be updated as the hocon dep changes -326 // (But tests should detect this breakage) -327 private static final Constructor<? extends ConfigValue> CONFIG_OBJECT_CONSTRUCTOR; -328 private static final Constructor<? extends ConfigValue> CONFIG_LIST_CONSTRUCTOR; -329 -330 static { -331 final Class<? extends ConfigValue> objectClass; -332 final Class<? extends ConfigValue> listClass; -333 try { -334 objectClass = Class.forName("com.typesafe.config.impl.SimpleConfigObject").asSubclass(ConfigValue.class); -335 listClass = Class.forName("com.typesafe.config.impl.SimpleConfigList").asSubclass(ConfigValue.class); -336 } catch (final ClassNotFoundException e) { -337 throw new ExceptionInInitializerError(e); -338 } -339 -340 try { -341 CONFIG_OBJECT_CONSTRUCTOR = objectClass.getDeclaredConstructor(ConfigOrigin.class, Map.class); -342 CONFIG_OBJECT_CONSTRUCTOR.setAccessible(true); -343 CONFIG_LIST_CONSTRUCTOR = listClass.getDeclaredConstructor(ConfigOrigin.class, List.class); -344 CONFIG_LIST_CONSTRUCTOR.setAccessible(true); -345 } catch (final NoSuchMethodException e) { +318 +319 } +320 +321 static ConfigValue newConfigList(final List<ConfigValue> vals) { +322 try { +323 return CONFIG_LIST_CONSTRUCTOR.newInstance(CONFIGURATE_ORIGIN, vals); +324 } catch (InstantiationException | IllegalAccessException | InvocationTargetException e) { +325 throw new RuntimeException(e); // rethrow +326 } +327 } +328 +329 @Override +330 public CommentedConfigurationNode createNode(final ConfigurationOptions options) { +331 return CommentedConfigurationNode.root(options.nativeTypes(NATIVE_TYPES)); +332 } +333 +334 // -- Comment handling -- this might have to be updated as the hocon dep changes +335 // (But tests should detect this breakage) +336 private static final Constructor<? extends ConfigValue> CONFIG_OBJECT_CONSTRUCTOR; +337 private static final Constructor<? extends ConfigValue> CONFIG_LIST_CONSTRUCTOR; +338 +339 static { +340 final Class<? extends ConfigValue> objectClass; +341 final Class<? extends ConfigValue> listClass; +342 try { +343 objectClass = Class.forName("com.typesafe.config.impl.SimpleConfigObject").asSubclass(ConfigValue.class); +344 listClass = Class.forName("com.typesafe.config.impl.SimpleConfigList").asSubclass(ConfigValue.class); +345 } catch (final ClassNotFoundException e) { 346 throw new ExceptionInInitializerError(e); 347 } -348 } -349 -350} +348 +349 try { +350 CONFIG_OBJECT_CONSTRUCTOR = objectClass.getDeclaredConstructor(ConfigOrigin.class, Map.class); +351 CONFIG_OBJECT_CONSTRUCTOR.setAccessible(true); +352 CONFIG_LIST_CONSTRUCTOR = listClass.getDeclaredConstructor(ConfigOrigin.class, List.class); +353 CONFIG_LIST_CONSTRUCTOR.setAccessible(true); +354 } catch (final NoSuchMethodException e) { +355 throw new ExceptionInInitializerError(e); +356 } +357 } +358 +359} diff --git a/configurate/hocon/4.2.0-SNAPSHOT/type-search-index.zip b/configurate/hocon/4.2.0-SNAPSHOT/type-search-index.zip index 6b289b61653fcfd30092e282b9a662e979338bf4..bac4ad4f9015d26a5e86dfbd56ed332f75c2f083 100644 GIT binary patch delta 26 gcmbQiG=qsJz?+#xgn@&DgJFTfM4o+2K=Oh($ delta 26 gcmbQiG=qsJz?+#xgn@&DgW;I$M4o+2K=O