Details
-
Bug
-
Resolution: Done
-
Major
-
5.0.0.ALPHA1
-
None
Description
Enhance Externalizer interface with methods for getTypeClasses(), getTypeClassNames() and getId() in favour of annotations.
The reason for doing this is twofold:
- The use of annotations makes it difficult for other apps to abstract the externalizer framework.
- Runtime errors not caught at compilation time could arise from code like this where X and Y have no relationship:
@Marshalls(typeClasses = Y.class, id = ExternalizerIds.XExternalizer)
public class XExternalizer implements
Externalizer<X> {
In particular, code like this would maintain guarantees between classes externalized and return of readObject():
List<Class<? extends T>> getTypeClasses();