Set the proper visibility of the method.