fury
fury copied to clipboard
[Java] Support codegen for xlang serialization in java for compatible mode
Feature Request
Feature Request
Currently all xlang serialization don't support codegen:
@Data
public static class Foo {
public Integer f1;
public String f2;
public List<String> f3;
public Map<String, Integer> f4;
public Bar f5;
}
@Data
public static class Bar {
public Integer f1;
public String f2;
}
@Test
public void testMetaSharedBasic() {
Fory fory =
Fory.builder()
.withLanguage(Language.XLANG)
.withCodegen(false)
.withCompatibleMode(CompatibleMode.COMPATIBLE)
.build();
fory.register(Foo.class, "example.foo");
fory.register(Bar.class, "example.bar");
serDeCheck(fory, Bar.create());
serDeCheck(fory, Foo.create());
}
we should support it for better performance:
@Test
public void testMetaSharedBasic() {
Fory fory =
Fory.builder()
.withLanguage(Language.XLANG)
.withCodegen(true)
.withCompatibleMode(CompatibleMode.COMPATIBLE)
.build();
fory.register(Foo.class, "example.foo");
fory.register(Bar.class, "example.bar");
serDeCheck(fory, Bar.create());
serDeCheck(fory, Foo.create());
}
Is your feature request related to a problem? Please describe
No response
Describe the solution you'd like
We need to change:
- BaseObjectCodecBuilder.java
- ObjectCodecBuilder.java
- MetaSharedCodecBuilder.java
Describe alternatives you've considered
No response
Additional context
No response
Is your feature request related to a problem? Please describe
No response
Describe the solution you'd like
No response
Describe alternatives you've considered
No response
Additional context
No response
Please assign it to me.
Assigned, but please note that this feature relies on the implementation of #2286. We may need to wait for some time before we can start tom implement this feature