Change visibility of getResource to protected

To allow it to be overwritten in client applications.