public static String[] roles(final Role... roles)
    {
        final List<String> names = new ArrayList<>(roles.length);
        for (Role role : roles)
        {
            names.add(role.getName());
        }
        return names.toArray(new String[names.size()]);
    }
public static String[] roles(final Role... roles)
    {
        final List<String> names = new ArrayList<>(roles.length);
        for (Role role : roles)
        {
            names.add(role.getName());
        }
        return names.toArray(new String[names.size()]);
    }
public static String [ ] roles ( final Role ... roles ) { final List < String > names = new ArrayList <> ( roles . length ) ; for ( Role role : roles ) { names . add ( role . getName ( ) ) ; } return names . toArray ( new String [ names . size ( ) ] ) ; }
Converts the roles into a String array.

@param roles the roles
@return the roles as an array of strings
Converts the roles into a String array .