All Fory’s basic interface, including Fory’s basic methods.
| 33 | |
| 34 | /** All Fory’s basic interface, including Fory’s basic methods. */ |
| 35 | public interface BaseFory { |
| 36 | |
| 37 | /** |
| 38 | * Register class and allocate an auto-grown ID for this class. |
| 39 | * |
| 40 | * <p><b>NOTE</b>: The registration order is important. If registration order is inconsistent, the |
| 41 | * allocated ID will be different, and the deserialization will failed !!! |
| 42 | * |
| 43 | * @param cls class to register. |
| 44 | */ |
| 45 | void register(Class<?> cls); |
| 46 | |
| 47 | /** |
| 48 | * register class with given id. |
| 49 | * |
| 50 | * <p><b>NOTE</b>: The registration id is important. If registration id is inconsistent, and the |
| 51 | * deserialization will failed !!! |
| 52 | */ |
| 53 | void register(Class<?> cls, int id); |
| 54 | |
| 55 | /** |
| 56 | * Register class with a name used for cross-language serialization. Names with `.` are split by |
| 57 | * the last `.` into namespace and type name. |
| 58 | */ |
| 59 | void register(Class<?> cls, String name); |
| 60 | |
| 61 | /** |
| 62 | * register class with given type namespace and name. This can be used mapping different classes |
| 63 | * into same type when deserializing. The type name must not contain `.`. |
| 64 | */ |
| 65 | void register(Class<?> cls, String namespace, String typeName); |
| 66 | |
| 67 | /** |
| 68 | * Register class and allocate an auto-grown ID for this class. |
| 69 | * |
| 70 | * <p><b>NOTE</b>: The registration order is important. If registration order is inconsistent, the |
| 71 | * allocated ID will be different, and the deserialization will failed !!! |
| 72 | * |
| 73 | * @param className full class name to register. |
| 74 | */ |
| 75 | void register(String className); |
| 76 | |
| 77 | /** register class with given id. */ |
| 78 | void register(String className, int classId); |
| 79 | |
| 80 | /** |
| 81 | * Register class with a name used for cross-language serialization. Names with `.` are split by |
| 82 | * the last `.` into namespace and type name. |
| 83 | */ |
| 84 | void register(String className, String name); |
| 85 | |
| 86 | /** |
| 87 | * register class with given type namespace and name. This can be used mapping different classes |
| 88 | * into same type when deserializing. The type name must not contain `.`. |
| 89 | */ |
| 90 | void register(String className, String namespace, String typeName); |
| 91 | |
| 92 | /** |
no outgoing calls
no test coverage detected