// and all of the leaf's subtypes are ready.
// (Copy values to avoid concurrent modification.)
List<TypeInfoComputed> ticsToCheck = new ArrayList<TypeInfoComputed>();
ticsToCheck.addAll(typeToTypeInfoComputed.values());
for (TypeInfoComputed tic : ticsToCheck) {
JArrayType type = tic.getType().isArray();
if (type != null && tic.instantiable) {
ProblemReport problems = new ProblemReport();
problems.setContextType(type);
markArrayTypes(logger, type, tic.getPath(), problems);
maybeReport(logger, problems);
allSucceeded &= !problems.hasFatalProblems();
}
}
if (!allSucceeded) {
throw new UnableToCompleteException();
}
assertNothingPending();
pruneUnreachableTypes();
logReachableTypes(logger);
Set<JClassType> possiblyInstantiatedTypes = new TreeSet<JClassType>(JTYPE_COMPARATOR);
Set<JClassType> fieldSerializableTypes = new TreeSet<JClassType>(JTYPE_COMPARATOR);
for (TypeInfoComputed tic : typeToTypeInfoComputed.values()) {
if (!(tic.getType() instanceof JClassType)) {
continue;
}
JClassType type = (JClassType) tic.getType();
type = type.getErasedType();
if (tic.isInstantiable()) {
assert (!type.isAbstract() || type.isEnum() != null);
possiblyInstantiatedTypes.add(type);
}
if (tic.isFieldSerializable()) {
assert (type.isInterface() == null);
fieldSerializableTypes.add(type);
}
if (tic.maybeEnhanced()
|| (enhancedClasses != null && enhancedClasses.contains(type.getQualifiedSourceName()))) {
type.setEnhanced();
}
}
logSerializableTypes(logger, fieldSerializableTypes);