public static HandlerLibrary load ( Messager messager , Trees trees ) { HandlerLibrary library = new HandlerLibrary ( messager ) ; try { loadAnnotationHandlers ( library , trees ) ; loadVisitorHandlers ( library , trees ) ; } catch ( IOException e ) { System . err . println ( "Lombok isn't running due to misconfigured SPI files: " + e ) ; } library . calculatePriorities ( ) ; return library ; }
Creates a new HandlerLibrary that will report any problems or errors to the provided messager then uses SPI discovery to load all annotation and visitor based handlers so that future calls to the handle methods will defer to these handlers .