private ResourceGenerator resolveResourceGenerator ( String path ) { ResourceGenerator resourceGenerator = null ; for ( ResourceGeneratorResolverWrapper resolver : resolverRegistry ) { if ( resolver . matchPath ( path ) ) { resourceGenerator = resolver . getResourceGenerator ( ) ; if ( resolver . getType ( ) . equals ( ResolverType . PREFIXED ) ) { loadGeneratorIfNeeded ( resolver . getResourcePath ( path ) ) ; } break ; } } // Lazy load generator if ( resourceGenerator == null ) { resourceGenerator = loadCommonGenerator ( path ) ; } return resourceGenerator ; }
Finds the resource generator which will handle the resource whose the path is given in parameter