if (name == null)
name = GUID.asString();
String[] intfs = (interfaces != null) ? interfaces.toArray(new String[interfaces.size()]) : null;
InterfaceIntroduction introduction = null;
if (classes != null)
{
introduction = new InterfaceIntroduction(name, classes, intfs);
}
else
{
ASTStart start = new TypeExpressionParser(new StringReader(expr)).Start();
introduction = new InterfaceIntroduction(name, start, intfs);
}
if (mixins != null)
{
for (MixinEntry entry : mixins)
{
if (entry.getInterfaces() == null)
throw new IllegalArgumentException("MixinEntry with null interfaces");
if (entry.getMixin() == null)
throw new IllegalArgumentException("MixinEntry with null mixin");
String[] intfaces = entry.getInterfaces().toArray(new String[entry.getInterfaces().size()]);
introduction.addMixin(new InterfaceIntroduction.Mixin(entry.getMixin(), intfaces, entry.getConstruction(), entry.isTransient()));
}
}
manager.addInterfaceIntroduction(introduction);
}