// include any @XmlSeeAlso references.
Set<Class> classSet = new HashSet<Class>(seeAlsoClasses);
for (TypeCallbackPair pair : nameCallbacks) {
final GenericType genericType = pair.genericType;
Class<?> clazz = genericType.getRawType();
// Is this class itself interesting?
if (clazz.getAnnotation(XmlRootElement.class) != null) {
classSet.add(clazz);
} else if (SPECIAL_GENERIC_TYPES.contains(clazz)) {
Type type = genericType.getType();
if (type instanceof ParameterizedType) {
Type parameterType = ((ParameterizedType) type).getActualTypeArguments()[0];
if (parameterType instanceof Class) {
classSet.add((Class) parameterType);
}