Design Pattern templates in Java