}
}
}
private void processAliasAnnotation(final Class<?> type, final Set<Class<?>> types) {
final XStreamAlias aliasAnnotation = type.getAnnotation(XStreamAlias.class);
if (aliasAnnotation != null) {
if (classAliasingMapper == null) {
throw new InitializationException("No "
+ ClassAliasingMapper.class.getName()
+ " available");
}
if (aliasAnnotation.impl() != Void.class) {
// Alias for Interface/Class with an impl
classAliasingMapper.addClassAlias(aliasAnnotation.value(), type);
defaultImplementationsMapper.addDefaultImplementation(
aliasAnnotation.impl(), type);
if (type.isInterface()) {
types.add(aliasAnnotation.impl()); // alias Interface's impl
}
} else {
classAliasingMapper.addClassAlias(aliasAnnotation.value(), type);
}
}
}