public void accept ( final WebAppVisitor visitor ) { visitor . visit ( this ) ; // First do everything else for ( WebAppListener listener : listeners ) { visitor . visit ( listener ) ; } if ( ! filters . isEmpty ( ) ) { // first visit the filters with a filter mapping in mapping order final List < WebAppFilter > remainingFilters = new ArrayList <> ( filters . values ( ) ) ; for ( String filterName : orderedFilters ) { final WebAppFilter filter = filters . get ( filterName ) ; visitor . visit ( filter ) ; remainingFilters . remove ( filter ) ; } // then visit filters without a mapping order in the order they were // added for ( WebAppFilter filter : remainingFilters ) { visitor . visit ( filter ) ; } } if ( ! servlets . isEmpty ( ) ) { for ( WebAppServlet servlet : getSortedWebAppServlet ( ) ) { // Fix for PAXWEB-205 visitor . visit ( servlet ) ; } } if ( ! constraintsMapping . isEmpty ( ) ) { for ( WebAppConstraintMapping constraintMapping : constraintsMapping ) { visitor . visit ( constraintMapping ) ; } } for ( WebAppErrorPage errorPage : errorPages ) { visitor . visit ( errorPage ) ; } visitor . end ( ) ; }
Accepts a visitor for inner elements .