}
}
for (Class<?> exposed : factory.getExposedClasses()) {
if (exposed.isAnnotationPresent(Portable.class)) {
Portable p = exposed.getAnnotation(Portable.class);
if (!p.aliasOf().equals(Object.class)) {
if (!factory.hasDefinition(p.aliasOf())) {
throw new RuntimeException("cannot alias " + exposed.getName() + " to unmapped type: "
+ p.aliasOf().getName());
}
factory.getDefinition(exposed)
.setMarshallerInstance(factory.getDefinition(p.aliasOf()).getMarshallerInstance());
}
if (exposed.isEnum()) {
factory.getDefinition(exposed)
.setMarshallerInstance(new DefaultEnumMarshaller(exposed));