Class DefaultConfigParser
- All Implemented Interfaces:
ObjectConfigSerializer<Object>,Parser<Object>
- Scheduled removal version:
- 6.4.0
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated, for removal: This API element is subject to removal in a future version.Parses a raw object into the target type.org.bukkit.configuration.MemorySectionserializeToMemorySection(Object object) Deprecated, for removal: This API element is subject to removal in a future version.Serializesobjectinto aMemorySection.Methods inherited from class com.ultikits.ultitools.interfaces.impl.pasers.ConfigParser
serialize
-
Constructor Details
-
DefaultConfigParser
public DefaultConfigParser()Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
parse
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:ParserParses a raw object into the target type.- Parameters:
object- the raw object to parse (typically from configuration)- Returns:
- the parsed object of type T
-
serializeToMemorySection
Deprecated, for removal: This API element is subject to removal in a future version.Serializesobjectinto aMemorySection.MapandCollectionvalues are walked by their own entries/elements rather than reflected on: aMap/Collectioninstance's own fields are a JDK implementation detail (e.g.LinkedHashMap'stable/head/tail/modCount), and reflecting on them is wrong even wheresetAccessiblesucceeds - it would persist the container's internal bookkeeping instead of its actual contents. On Java 16+ it additionally throwsInaccessibleObjectExceptionthe first time it tries to open a privatejava.utilfield (e.g.LinkedHashMap#serialVersionUID), becausejava.basedoes not openjava.utilto an unnamed module.Everything else falls back to the pre-existing reflective walk of the object's own fields, skipping
static,transient, and synthetic fields:staticfields (like the JDK's ownserialVersionUID) are never per-instance state,transientfields are the field author's own "do not persist this" signal, and synthetic fields are compiler-generated bookkeeping (e.g. outer-class references) with no meaningful config representation.- Parameters:
object- the object to serialize- Returns:
- the populated
MemorySection
-
ConfigConverterandConfigConverterFor; removed in the next version.