-
-
Notifications
You must be signed in to change notification settings - Fork 342
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API additions + changes for Configurate 4 #2193
Conversation
16ee119
to
9e873c6
Compare
Alright, I've made some more progress on this PR, and most of the groundwork is in. The big change (apart from Configurate 4 itself) is moving away from Guava's For areas where a type is expected from a user, two variants are provided: One that accepts a Where this strategy gets a bit tricky is for methods that return An area that will need a bit more thought is the catalog registry. While a lot of its API takes With these changes I hope to constrain the spread of TypeTokens to only types that need to capture generic parameters, which will help reduce the verbosity of the API. The majority of the constants in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine from the commands end (does on Common too, too lazy to post twice).
|
||
/** | ||
* Gets the class of the element of the {@link Value} this {@link Key} | ||
* is representing. On occasion, if the element is a {@link Collection} type, | ||
* one can occasionally use {@link TypeToken#resolveType(Type)} with | ||
* {@link Class#getTypeParameters()} as the type parameter of a collection | ||
* one can occasionally use {@link ParameterizedType#getActualTypeArguments()} with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The javadoc got broken here!
9e873c6
to
facc076
Compare
81ee7c6
to
a9e8c7d
Compare
SpongeAPI | SpongeCommon
This updates the API for changes in Configurate, and to move away from the Guava
TypeToken
.API spec changes
The biggest non-obvious changes are to injection -- since these are defined in the implementation they aren't captured super well. I've added in a few new injectable types:
ConfigurationReference<CommentedConfigurationNode>
: both shared and private roots, provides an auto-reloading configurationTypeSerializerCollection
: Exposes the Sponge-defined serializersand set up some customized default options for configurations: