if (!intf.equals("")) interfaces.add(intf);
}
ifaces = interfaces.toArray(new String[interfaces.size()]);
}
InterfaceIntroduction pcut = null;
if (classExpr != null)
{
pcut = new InterfaceIntroduction(name, classExpr, ifaces);
}
else
{
ASTStart start = new TypeExpressionParser(new StringReader(ast)).Start();
pcut = new InterfaceIntroduction(name, start, ifaces);
}
Iterator<Element> it = XmlHelper.getChildrenByTagName(pointcut, "mixin");
while (it.hasNext())
{
Element mixin = it.next();
if (mixin != null)
{
String construction = XmlHelper.getOptionalChildContent(mixin, "construction");
String classname = XmlHelper.getUniqueChildContent(mixin, "class");
String isTransientString = mixin.getAttribute("transient");
boolean isTransient = true;
if (isTransientString == null || isTransientString.trim().equals(""))
{
isTransient = true;
}
else
{
isTransient = new Boolean(isTransientString).booleanValue();
}
intfs = XmlHelper.getUniqueChildContent(mixin, "interfaces");
StringTokenizer tokenizer = new StringTokenizer(intfs, ",");
ArrayList<String> interfaces = new ArrayList<String>();
while (tokenizer.hasMoreTokens())
{
String intf = tokenizer.nextToken().trim();
if (!intf.equals("")) interfaces.add(intf);
}
ifaces = interfaces.toArray(new String[interfaces.size()]);
pcut.getMixins().add(new InterfaceIntroduction.Mixin(classname, ifaces, construction, isTransient));
}
}
manager.addInterfaceIntroduction(pcut);
}