Skip to content

Commit

Permalink
more details on serializer annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
HSGamer committed Dec 31, 2023
1 parent e045198 commit 3ec2308
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ public void register(String type, Class<? extends D> dataClass, Function<I, D> d
}

/**
* Register a new data type
* Register a new data type, without specifying the type.
* The type will be the class name, or the value of {@link SerializerType} if the class is annotated with it.
*
* @param dataClass the data class
* @param dataFunction the data function
Expand All @@ -62,9 +63,13 @@ public void register(Class<? extends D> dataClass, Function<I, D> dataFunction)
}

/**
* Register a new data type
* Register a new data type, without specifying the type and the data function.
* The type will be the class name, or the value of {@link SerializerType} if the class is annotated with it.
* The data function will be the static method annotated with {@link SerializerFunction}.
*
* @param dataClass the data class
*
* @throws IllegalArgumentException if the data function is not found
*/
public void register(Class<? extends D> dataClass) {
Function<I, D> dataFunction;
Expand Down

0 comments on commit 3ec2308

Please sign in to comment.