Skip to content

Instantly share code, notes, and snippets.

@mlooney
Created October 26, 2010 16:57
Show Gist options
  • Save mlooney/647287 to your computer and use it in GitHub Desktop.
Save mlooney/647287 to your computer and use it in GitHub Desktop.
// Locate update methods
Method subscriptionMethod = null;
ArrayList<Method> updateMethods = new ArrayList<Method>();
for (Method method : subscriber.getClass().getMethods())
{
if ((method.getName().equals("update")) &&
(Modifier.isPublic(method.getModifiers())))
{
updateMethods.add(method);
}
}
// none found
if (updateMethods.size() == 0)
{
String message = "Subscriber object does not provide a public method by name 'update'";
throw new EPSubscriberException(message);
}
@mlooney
Copy link
Author

mlooney commented Oct 26, 2010

durr. 1.1.6 < 1.6.*

@nicksieger
Copy link

hmm. out of date examples? does java_signature work? what about jrubyc? see http://github.com/nicksieger/java-from-ruby-examples/blob/master/compile/compile.rb for example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment