This question is being asked everywhere on Google but I\'m still having trouble with it. Here is what I\'m trying to do. So like my title states, I\'m getting an \'object
You're invoking the method with the class, but you need an instance of it. Try this:
serverMethod.invoke(base.newInstance(), new HashMap());