public List < CommandInterceptor > asList ( ) { ArrayList < CommandInterceptor > list = new ArrayList <> ( asyncInterceptorChain . getInterceptors ( ) . size ( ) ) ; asyncInterceptorChain . getInterceptors ( ) . forEach ( ci -> { if ( ci instanceof CommandInterceptor ) { list . add ( ( CommandInterceptor ) ci ) ; } } ) ; return list ; }
Returns an unmofiable list with all the interceptors in sequence . If first in chain is null an empty list is returned .