String pos = UTXml.getTrimmedAttribute(eAffix, ATTR_POS);
String orgPOS = UTXml.getTrimmedAttribute(eAffix, ATTR_ORG_POS);
Pattern oPOS = orgPOS.equals(UNConstant.EMPTY) ? null : Pattern.compile("^("+orgPOS+")$");
boolean bSuffix = type.equals(VAL_SUFFIX);
AbstractAffixMatcher matcher;
if (bSuffix) matcher = new EnglishSuffixMatcher(form, pos, oPOS);
else throw new IllegalArgumentException("Invalid affix type: "+type);
NodeList list = eAffix.getElementsByTagName(ELEM_RULE);
AbstractAffixReplacer replacer;
int i, size = list.getLength();
for (i=0; i<size; i++)
{
replacer = getAffixReplacer(bSuffix, (Element)list.item(i));
if (replacer != null) matcher.addReplacer(replacer);
}
return matcher;
}