public ThymeLeafTemplateImplementation getTemplateByResourceName ( String resourceName ) { Collection < ThymeLeafTemplateImplementation > list = registrations . keySet ( ) ; for ( ThymeLeafTemplateImplementation template : list ) { if ( template . fullName ( ) . endsWith ( resourceName ) || template . fullName ( ) . endsWith ( resourceName + "." + extension ( ) ) ) { return template ; } if ( template . name ( ) . equals ( resourceName ) ) { return template ; } } return null ; }
Finds a template object from the given resource name . The first template matching the given name is returned .