class RemoveEmptyLists extends Visitor {

    public void removeEmptyLists(TTopologyTemplate topologyTemplate) {
        final TPolicies policies = topologyTemplate.getPolicies();
        if ((policies != null) && policies.getPolicy().isEmpty()) {
            topologyTemplate.setPolicies(null);
        }
        this.visit(topologyTemplate);
    }

}