for (int i = 0; i < n; i++)
{
IReference implementedInterface = implementedInterfaces[i];
ITypeDefinition typeDefinition =
resolveType(implementedInterface, project, DependencyType.INHERITANCE);
if (!(typeDefinition instanceof InterfaceDefinition))
{
IDefinition idef = null;
if (typeDefinition == null)
{
idef = implementedInterface.resolve(project, (ASScope)this.getContainingASScope(), DependencyType.INHERITANCE, true);
}
if (problems != null)
{
if (idef instanceof AmbiguousDefinition)
problems.add(new AmbiguousReferenceProblem(getNode(), implementedInterface.getDisplayString()));
else
problems.add(unknownInterfaceProblem(implementedInterface, i));
}
typeDefinition = null;
}
else if (seenInterfaces != null)
{
if (seenInterfaces.contains(typeDefinition))
{
if (problems != null)
problems.add(duplicateInterfaceProblem(implementedInterface, i));
}
seenInterfaces.add((InterfaceDefinition)typeDefinition);
}
if (problems != null)
{
// Report a problem if the interface is deprecated
// and the reference to it is not within a deprecated API.
if (typeDefinition != null && typeDefinition.isDeprecated())
{
IASNode node = getInterfaceNode(i);
if (!SemanticUtils.hasDeprecatedAncestor(node))
{
ICompilerProblem problem = SemanticUtils.createDeprecationProblem(typeDefinition, node);
problems.add(problem);
}
}
}
result[i] = (InterfaceDefinition)typeDefinition;
}
if (includeImplicits)
{
if (needsEventDispatcher(project))
{
ITypeDefinition iEventDispatcher = resolveType(IASLanguageConstants.IEventDispatcher, project, null);
if (iEventDispatcher instanceof InterfaceDefinition)
{
InterfaceDefinition[] newResult = new InterfaceDefinition[result.length + 1];
System.arraycopy(result, 0, newResult, 0, result.length);
newResult[result.length] = (InterfaceDefinition)iEventDispatcher;