private static void parseXelMethod(PageDefinition pgdef, ProcessingInstruction pi, Map<String, String> params)
throws Exception {
final String prefix = params.remove("prefix");
noELnorEmpty("prefix", prefix, pi);
final String nm = params.remove("name");
noELnorEmpty("name", nm, pi);
final String clsnm = params.remove("class");
noELnorEmpty("class", clsnm, pi);
final String sig = params.remove("signature");
noELnorEmpty("signature", sig, pi);
final Method mtd;
try {
final ClassResolver clsresolver = pgdef.getImportedClassResolver();
final Class cls = clsresolver.resolveClass(clsnm);
mtd = Classes.getMethodBySignature(cls, sig, null, clsresolver);
} catch (ClassNotFoundException ex) {
throw new UiException(message("Class not found: " + ex.getMessage(), pi));
} catch (Exception ex) {
throw new UiException(message("Method not found: " + sig + " in " + clsnm, pi));
}
if ((mtd.getModifiers() & Modifier.STATIC) == 0)
throw new UiException(message("Not a static method: " + mtd, pi));
pgdef.addXelMethod(prefix, nm, new MethodFunction(mtd));
}