public String call(final String input) {
try {
final Object result = javaMethod.invoke(object, input);
return result == null ? null : result.toString();
} catch (final IllegalAccessException e) {
throw new SmallerException("Illegal access to callback method", e);
} catch (final InvocationTargetException e) {
throw new SmallerException("Failed to execute callback method", e
.getTargetException());
}
}
});
} catch (final NoSuchMethodException e) {
throw new SmallerException("Failed to reflect global method", e);
}
}