List of usage examples for org.jsoup.nodes Element getClass
@HotSpotIntrinsicCandidate public final native Class<?> getClass();
From source file:cn.wanghaomiao.xpath.core.XpathEvaluator.java
/** * /*from ww w . j av a2 s .c o m*/ * * @param funcname * @param el * @return * @throws NoSuchFunctionException */ public Object callFilterFunc(String funcname, Element el) throws NoSuchFunctionException { try { Method function = emFuncs.get(renderFuncKey(funcname, el.getClass())); return function.invoke(SingletonProducer.getInstance().getFunctions(), el); } catch (Exception e) { throw new NoSuchFunctionException("This function is not supported"); } }
From source file:cn.wanghaomiao.xpath.core.XpathEvaluator.java
/** * /*from w w w . j a v a 2 s . c om*/ * * @param axis * @param e * @return * @throws NoSuchAxisException */ public Elements getAxisScopeEls(String axis, Element e) throws NoSuchAxisException { try { String functionName = CommonUtil.getJMethodNameFromStr(axis); Method axisSelector = axisFuncs.get(renderFuncKey(functionName, e.getClass())); return (Elements) axisSelector.invoke(SingletonProducer.getInstance().getAxisSelector(), e); } catch (Exception e1) { throw new NoSuchAxisException("this axis is not supported,plase use other instead of '" + axis + "'"); } }