Java Code Examples for org.apache.commons.lang.reflect.MethodUtils#invokeStaticMethod()

The following examples show how to use org.apache.commons.lang.reflect.MethodUtils#invokeStaticMethod() . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
@VisibleForTesting
protected static void inVokeDetermineSchemaOrThrowExceptionMethod(Properties props, Configuration conf)
    throws NoSuchMethodException, IllegalAccessException, InvocationTargetException {
  String methodName = "determineSchemaOrThrowException";
  Method method = MethodUtils.getAccessibleMethod(AvroSerdeUtils.class, methodName, Properties.class);
  boolean withConf = false;
  if (method == null) {
    method = MethodUtils
        .getAccessibleMethod(AvroSerdeUtils.class, methodName, new Class[]{Configuration.class, Properties.class});
    withConf = true;
  }
  Preconditions.checkNotNull(method, "Cannot find matching " + methodName);
  if (!withConf) {
    MethodUtils.invokeStaticMethod(AvroSerdeUtils.class, methodName, props);
  } else {
    MethodUtils.invokeStaticMethod(AvroSerdeUtils.class, methodName, new Object[]{conf, props});
  }
}
 
Example 2
public static boolean update() {
   try {
      return (Boolean)MethodUtils.invokeStaticMethod(Class.forName("be.fgov.ehealth.technicalconnector.bootstrap.bcp.EndpointUpdater"), "update", new Object[0]);
   } catch (Exception var1) {
      LOG.error("Unable to update endpoints", var1);
      return false;
   }
}
 
Example 3
public void run() {
   try {
      MethodUtils.invokeStaticMethod(Class.forName("be.fgov.ehealth.technicalconnector.bootstrap.tsl.TrustStoreUpdater"), "launch", new Object[0]);
   } catch (Exception var2) {
      LOG.error("Unable to update truststores", var2);
   }

}
 
Example 4
public void run() {
   try {
      MethodUtils.invokeStaticMethod(Class.forName("be.fgov.ehealth.technicalconnector.bootstrap.tsl.TrustStoreUpdater"), "launch", new Object[0]);
   } catch (Exception var2) {
      LOG.error("Unable to update truststores", var2);
   }

}
 
Example 5
public static boolean update() {
   try {
      return ((Boolean)MethodUtils.invokeStaticMethod(Class.forName("be.fgov.ehealth.technicalconnector.bootstrap.bcp.EndpointUpdater"), "update", new Object[0]));
   } catch (Exception var1) {
      LOG.error("Unable to update endpoints", var1);
      return false;
   }
}
 
Example 6
public void run() {
   try {
      MethodUtils.invokeStaticMethod(Class.forName("be.fgov.ehealth.technicalconnector.bootstrap.tsl.TrustStoreUpdater"), "launch", new Object[0]);
   } catch (Exception var2) {
      LOG.error("Unable to update truststores", var2);
   }

}
 
Example 7
public void run() {
   try {
      MethodUtils.invokeStaticMethod(Class.forName("be.fgov.ehealth.technicalconnector.bootstrap.tsl.TrustStoreUpdater"), "launch", new Object[0]);
   } catch (Exception var2) {
      LOG.error("Unable to update truststores", var2);
   }

}
 
Example 8
public void run() {
   try {
      MethodUtils.invokeStaticMethod(Class.forName("be.fgov.ehealth.technicalconnector.bootstrap.tsl.TrustStoreUpdater"), "launch", new Object[0]);
   } catch (Exception var2) {
      LOG.error("Unable to update truststores", var2);
   }

}