@PublicAPI(usage = ACCESS)
    public Slices namingSlices(String pattern) {
        List<Slice> newSlices = new ArrayList<>();
        for (Slice slice : slices) {
            newSlices.add(slice.as(pattern));
        }
        return new Slices(newSlices, description);
    }
@ PublicAPI ( usage = ACCESS ) public Slices namingSlices ( String pattern ) { List < Slice > newSlices = new ArrayList < > ( ) ; for ( Slice slice : slices ) { newSlices . add ( slice . as ( pattern ) ) ; } return new Slices ( newSlices , description ) ; }
Allows the naming of single slices, where back references to the matching pattern can be denoted by '$' followed
by capturing group number. <br>
E.g. {@code namingSlices("Slice $1")} would name a slice matching {@code '*..service.(*)..*'}
against {@code 'com.some.company.service.hello.something'} as 'Slice hello'.<br>
Likewise, if the slices were created by a {@link SliceAssignment} (compare
{@link #assignedFrom(SliceAssignment)}),
then the back reference refers to the n-th element of the identifier.

@param pattern The naming pattern, e.g. 'Slice $1'
@return <b>New</b> (equivalent) slices with adjusted description for each single slice