private Converter getConverter(Class class1, Constructor constructor) throws Exception { constructor = (Converter) constructor.newInstance(new Object[0]); if (constructor != null) { cache.cache(class1, constructor); } return constructor; }
/** * This is used to acquire the attribute path using this XPath expression. The attribute path is * simply the fully qualified path for this expression with the provided name appended. If this is * an empty path, the provided name is returned. * * @param name this is the name of the attribute to be used * @return a fully qualified path for the specified name */ public String getAttribute(String name) { if (!isEmpty(location)) { String path = attributes.fetch(name); if (path == null) { path = getAttributePath(location, name); if (path != null) { attributes.cache(name, path); } } return path; } return style.getAttribute(name); }
/** * This is used to acquire the element path using this XPath expression. The element path is * simply the fully qualified path for this expression with the provided name appended. If this is * an empty path, the provided name is returned. * * @param name this is the name of the element to be used * @return a fully qualified path for the specified name */ public String getElement(String name) { if (!isEmpty(location)) { String path = elements.fetch(name); if (path == null) { path = getElementPath(location, name); if (path != null) { elements.cache(name, path); } } return path; } return style.getElement(name); }