下面列出了org.apache.commons.lang.reflect.MethodUtils#invokeStaticMethod ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
@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});
}
}
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;
}
}
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);
}
}
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);
}
}
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;
}
}
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);
}
}
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);
}
}
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);
}
}