예제 #1
0
 private void setEnabled(boolean enabled, int port) {
   ConfigurationUtil.addFromArgs(
       IcpManager.PARAM_ICP_ENABLED,
       Boolean.toString(enabled),
       IcpManager.PARAM_ICP_PORT,
       Integer.toString(enabled ? port : BAD_PORT));
 }
 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);
   }
 }