throw new IllegalArgumentException("type '" + type.getCanonicalName() + "' is an enumeration");
}
}
protected final void addClass(final int id, final Class<?> type, final boolean referenceable, final Map<Integer, Field> id2field) {
final Reflector reflector = reflector(type);
final Map<Integer, FieldHandler> id2fieldHandler = new HashMap<Integer, FieldHandler>(id2field.size());
for (final Map.Entry<Integer, Field> entry : id2field.entrySet()) {
final Field field = entry.getValue();
id2fieldHandler.put(entry.getKey(), new FieldHandler(field, reflector.accessor(field)));
}
addType(new TypeDesc(id, new ClassTypeHandler(type, reflector, referenceable, id2fieldHandler)));
}