The getter is an Anti-Pattern when it reveals the internals of a class to the caller. It is often indicative of an Anemic Domain Model. An Anemic Domain Models are thin on behaviour and is little more than a data model. Avoid this anti-pattern by maintaining the principle of Encapsulation. Use the principle of a single responsibility (the composite class should not need knowledge of its component class) to refactor the class and use delegation (the composite class tells the component class what to do). In short Tell Don't Ask.
Delegate responsibility for the required behaviour to the delegate class.
// delegate resp customer.printAddress( System.out ) ;
System.out.println( customer.getAddress() ) ;
“Get and set methods are evil.” (Allen Holub)