Element e = (Element) parser.getElementsByTagName("java").item(0); if (e != null) { setClassName(e.getAttribute("class")); setMethod(e.getAttribute("method")); setInitialized(Boolean.parseBoolean(e.getAttribute("initialized"))); NodeList nl = e.getElementsByTagName("with-param"); if (nl.getLength() > 0) { setInitialized(true); classParams = new ArrayList<Node>(); for (int i = 0; i < nl.getLength(); i++) {
ParserEntry pe = index.getParser(key); Object instance = null; if (pe.isInitialized()) { instance = parserInstances.get(key); if (instance == null) { TEClassLoader cl = engine.getClassLoader(opts .getSourcesName()); instance = Misc.makeInstance(pe.getClassName(), pe.getClassParams(), cl); } catch (Exception e) { throw new Exception("Can't instantiate parser " + pe.getName(), e); if (method == null) { TEClassLoader cl = engine.getClassLoader(opts.getSourcesName()); method = Misc.getMethod(pe.getClassName(), pe.getMethod(), cl, 3, 4); parserMethods.put(key, method); } catch (java.lang.reflect.InvocationTargetException e) { Throwable cause = e.getCause(); String msg = "Error invoking parser " + pe.getId() + "\n" + cause.getClass().getName(); if (cause.getMessage() != null) {
ParserEntry pe = new ParserEntry(el); parserMap.put(pe.getId(), pe);
ParserEntry pe = index.getParser(key); Object instance = null; if (pe.isInitialized()) { instance = parserInstances.get(key); if (instance == null) { TEClassLoader cl = engine.getClassLoader(opts .getSourcesName()); instance = Misc.makeInstance(pe.getClassName(), pe.getClassParams(), cl); } catch (Exception e) { throw new Exception("Can't instantiate parser " + pe.getName(), e); if (method == null) { TEClassLoader cl = engine.getClassLoader(opts.getSourcesName()); method = Misc.getMethod(pe.getClassName(), pe.getMethod(), cl, 3, 4); parserMethods.put(key, method); } catch (java.lang.reflect.InvocationTargetException e) { Throwable cause = e.getCause(); String msg = "Error invoking parser " + pe.getId() + "\n" + cause.getClass().getName(); if (cause.getMessage() != null) {
ParserEntry pe = new ParserEntry(el); parserMap.put(pe.getId(), pe);
Element e = (Element) parser.getElementsByTagName("java").item(0); if (e != null) { setClassName(e.getAttribute("class")); setMethod(e.getAttribute("method")); setInitialized(Boolean.parseBoolean(e.getAttribute("initialized"))); NodeList nl = e.getElementsByTagName("with-param"); if (nl.getLength() > 0) { setInitialized(true); classParams = new ArrayList<Node>(); for (int i = 0; i < nl.getLength(); i++) {