Marshallable marshallable = ReflectionUtil.getAnnotation(clazz, Marshallable.class);
if (marshallable != null && !marshallable.externalizer().equals(Externalizer.class)) {
int id = marshallable.id();
Externalizer ext = null;
try {
ext = Util.getInstance(marshallable.externalizer());
} catch (Exception e) {
throw new CacheException("Could not instantiate the externalizer: " + marshallable.externalizer(), e);
}
if (!ids.add(id))
throw new CacheException("Duplicate id found! id=" + id + " in " + ext.getClass().getName() + " is shared by another marshallable class.");