chaokunyang commented on code in PR #2904:
URL: https://github.com/apache/fory/pull/2904#discussion_r2510648267
##########
java/fory-core/src/main/java/org/apache/fory/builder/BaseObjectCodecBuilder.java:
##########
@@ -594,17 +610,26 @@ protected Expression writeClassInfo(
return writeClassAction;
}
+ protected Expression getOrCreateSerializer(Class<?> cls) {
+ return getOrCreateSerializer(cls, false);
+ }
+
/**
* Returns a serializer expression which will be used to call write/read
method to avoid virtual
* methods calls in most situations.
*/
- protected Expression getOrCreateSerializer(Class<?> cls) {
+ protected Expression getOrCreateSerializer(Class<?> cls, boolean finalField)
{
Review Comment:
Or maybe we could add a serializeField/deserializeField method in
BaseCodecBuilder, and you can intercept serialization for final field with
replace resolver in there
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]