Add accessor methods to objects.