diff --git a/src/main/java/carpet/script/annotation/AnnotationParser.java b/src/main/java/carpet/script/annotation/AnnotationParser.java index aa605526..987ecb0c 100644 --- a/src/main/java/carpet/script/annotation/AnnotationParser.java +++ b/src/main/java/carpet/script/annotation/AnnotationParser.java @@ -67,7 +67,7 @@ import it.unimi.dsi.fastutil.objects.ObjectArrayList; * @see OutputConverter#registerToValue(Class, java.util.function.Function) * @see OutputConverter#register(Class, java.util.function.Function) * @see ValueCaster#register(Class, String) - * @see SimpleTypeConverter#registerType(Class, Class, java.util.function.Function) + * @see SimpleTypeConverter#registerType(Class, Class, java.util.function.Function, String) * @see Param.Params#registerStrictConverter(Class, boolean, ValueConverter) * @see Param.Params#registerCustomConverterFactory(java.util.function.BiFunction) */ diff --git a/src/main/java/carpet/script/annotation/Param.java b/src/main/java/carpet/script/annotation/Param.java index 4718dbc8..9d28ea1f 100644 --- a/src/main/java/carpet/script/annotation/Param.java +++ b/src/main/java/carpet/script/annotation/Param.java @@ -170,8 +170,7 @@ public interface Param };*/ /** - *
A {@link ValueConverter} that outputs the {@link Context} in which the function has been called when running - * {@link #checkAndConvert(Iterator, Context, Context.Type)}, and throws {@link UnsupportedOperationException} when trying to convert a {@link Value} + *
A {@link ValueConverter} that outputs the {@link Context} in which the function has been called, and throws {@link UnsupportedOperationException} when trying to convert a {@link Value} * directly.
*/ static final ValueConverterA {@link ValueConverter} that outputs the {@link Context.Type} which the function has been called when running - * {@link #checkAndConvert(Iterator, Context, Context.Type)}, or throws {@link UnsupportedOperationException} when trying to convert a {@link Value} + *
A {@link ValueConverter} that outputs the {@link Context.Type} which the function has been called, or throws {@link UnsupportedOperationException} when trying to convert a {@link Value} * directly.
*/ static final ValueConverterTypes to be used in those functions must be already registered in their respective {@link ValueConverter} implementations.
- * In order to register a new type to convert to, you can do so in {@link SimpleTypeConverter#registerType(Class, Class, java.util.function.Function)},
+ * In order to register a new type to convert to, you can do so in {@link SimpleTypeConverter#registerType(Class, Class, java.util.function.Function, String)},
* and in order to register a new variant of {@link Value}, use {@link ValueCaster#register(Class, String)}.
* In order to convert the output of your method to a {@link LazyValue} you will also need to register its conversion in {@link OutputConverter}
{@link SimpleTypeConverter}s are reused whenever asked for one, since they don't have any complexity.
* - * @see #registerType(Class, Class, Function) + * @see #registerType(Class, Class, Function, String) * * @paramThe default constructor for {@link SimpleTypeConverter}.
* *This is public in order to provide an implementation to use when registering {@link ValueConverter}s for the {@link Param.Strict} annotation - * registry, and it's not intended way to register new {@link SimpleTypeConverter}
Use {@link #registerType(Class, Class, Function)} for + * registry, and it's not intended way to register new {@link SimpleTypeConverter}
Use {@link #registerType(Class, Class, Function, String)} for * that.
* * @param inputType The required type for the input {@link Value}