public static Class<?> getRequiredClass(String className) {
   try {
     return ClassUtils.getClass(className);
   } catch (ClassNotFoundException e) {
     throw new RuntimeException(e);
   }
 }
 public static Class<?> getOptionalClass(String className) {
   try {
     return ClassUtils.getClass(className);
   } catch (ClassNotFoundException e) {
     return null;
   } catch (NoClassDefFoundError e) {
     return null;
   }
 }
Ejemplo n.º 3
0
 public static String fakeECTXml() throws IOException, ClassNotFoundException {
   String r;
   // String filename = "ericsson activate CFU.xml";
   String filename = "ericsson deactivate CFU.xml";
   log.debug(filename);
   // log.debug(ClassUtils.getClass(ProxyProcessHelper.class.getName()).getClassLoader().getResource(filename));
   r =
       IOUtils.toString(
           ClassUtils.getClass(ProxyProcessHelper.class.getName())
               .getClassLoader()
               .getResourceAsStream(filename));
   return r;
 }