}
}
if (!includeLocalTypes || (parsedUnit.localTypes == null && parsedUnit.functionalExpressions == null))
return;
HandleFactory factory = new HandleFactory();
HashSet existingElements = new HashSet(parsedUnit.localTypeCount + parsedUnit.functionalExpressionsCount);
HashMap knownScopes = new HashMap(parsedUnit.localTypeCount + parsedUnit.functionalExpressionsCount);
if (parsedUnit.localTypes != null) {
for (int i = 0; i < parsedUnit.localTypeCount; i++) {
LocalTypeBinding localType = parsedUnit.localTypes[i];
ClassScope classScope = localType.scope;
TypeDeclaration typeDecl = classScope.referenceType();
IType typeHandle = (IType)factory.createElement(classScope, cu, existingElements, knownScopes);
rememberWithMemberTypes(typeDecl, typeHandle);
}
}
if (parsedUnit.functionalExpressions != null) {
for (int i = 0; i < parsedUnit.functionalExpressionsCount; i++) {
if (parsedUnit.functionalExpressions[i] instanceof LambdaExpression) {
final LambdaExpression expression = (LambdaExpression) parsedUnit.functionalExpressions[i];
if (expression.resolvedType != null && expression.resolvedType.isValidBinding()) {
IType typeHandle = (IType)factory.createLambdaTypeElement(expression, cu, existingElements, knownScopes);
remember(typeHandle, expression.getTypeBinding());
}
}
}
}