code: public String[] getRoles()
     {
        String[] roles = null;
  
        org.jboss.security.identity.RoleGroup pbRoles = delegator.getUtil().getRoles();
        if (pbRoles != null)
        {
           List<String> l = new ArrayList<String>(pbRoles.getRoles().size());
           for (org.jboss.security.identity.Role role : pbRoles.getRoles())
           {
              l.add(role.getRoleName());
           }
           roles = l.toArray(new String[l.size()]);
        }
  
        return roles;
     }
docs: {@inheritDoc}