public static Set < ImplicitContextData > getImplicitContextDataProviders ( ) { final Set < ImplicitContextData > result = new HashSet < ImplicitContextData > ( ) ; for ( Class clazz : ContextProviderServiceLoader . getServiceLocator ( ) . getImplicitContextProvider ( ) ) { try { if ( ImplicitContextData . class . isAssignableFrom ( clazz ) ) { ImplicitContextData instance = ( ImplicitContextData ) ( clazz . newInstance ( ) ) ; result . add ( instance ) ; } } catch ( Throwable e ) { // to be ignored } } return result ; }
Generic function to get a implicit data provider classes from resource files .