in xstream/src/java/com/thoughtworks/xstream/mapper/AnnotationMapper.java [533:557]
public boolean add(Class<?> type) {
if (type == null) {
return false;
}
while (type.isArray()) {
type = type.getComponentType();
}
final String name = type.getName();
if (name.startsWith("java.") || name.startsWith("javax.")) {
return false;
}
final boolean ret = annotatedTypes.contains(type) ? false : super.add(type);
if (ret) {
final XStreamInclude inc = type.getAnnotation(XStreamInclude.class);
if (inc != null) {
final Class<?>[] incTypes = inc.value();
if (incTypes != null) {
for (final Class<?> incType : incTypes) {
add(incType);
}
}
}
}
return ret;
}