ICompilerProblem problem = new MXMLNotAClassProblem(rootTag, tagDef.getQualifiedName());
builder.addProblem(problem);
return;
}
IClassDefinition tagDefinition = (IClassDefinition)tagDef;
// Report a problem if that class is final.
if (tagDefinition != null && tagDefinition.isFinal())
{
ICompilerProblem problem = new MXMLFinalClassProblem(rootTag, tagDef.getQualifiedName());
builder.addProblem(problem);
return;
}
// Report a problem is that class's constructor has required parameters.
IFunctionDefinition constructor = tagDefinition.getConstructor();
if (constructor != null && constructor.hasRequiredParameters())
{
ICompilerProblem problem = new MXMLConstructorHasParametersProblem(rootTag, tagDef.getQualifiedName());
builder.addProblem(problem);
return;