Minor performance improvement

It might seem like nothing, but the .class.getName() method is not always as
cheap as we would like.