public void setFeature(String name, boolean value) throws ParserConfigurationException { // fact.setFeature(name, value); try { invoke("setFeature", argsSetFeature, new Object[] {name, Boolean.valueOf(value)}); } catch (InvocationTargetException e) { if (e.getCause() instanceof ParserConfigurationException) { throw (ParserConfigurationException) e.getCause(); } if (e.getCause() instanceof RuntimeException) { throw (RuntimeException) e.getCause(); } throw new RuntimeException(e); } }
public boolean getFeature(String name) throws ParserConfigurationException { // return fact.getFeature(name); try { Object res = invoke("getFeatureccc", argsGetFeature, new Object[] {name}); return ((Boolean) res).booleanValue(); } catch (InvocationTargetException e) { if (e.getCause() instanceof ParserConfigurationException) { throw (ParserConfigurationException) e.getCause(); } if (e.getCause() instanceof RuntimeException) { throw (RuntimeException) e.getCause(); } throw new RuntimeException(e); } }