Add support for custom method names

This allows support for methods that aren't valid Java method names. This is useful for reimplementing an existing API with incompatible names.