This should be mTarget.getClass().getSpeed(mTarget), or you will get bad casts if actor class is not the same as target class.