public static List < TypeToWrapper > getAvailableWrappers ( ) { final List < TypeToWrapper > result = new ArrayList < TypeToWrapper > ( ) ; for ( Class clazz : ContextProviderServiceLoader . getServiceLocator ( ) . getContextProvider ( ) ) { try { if ( WrappedContextData . class . isAssignableFrom ( clazz ) ) { // try to create instance to get the wrapped type final WrappedContextData instance = ( WrappedContextData ) clazz . newInstance ( ) ; result . add ( new TypeToWrapper ( instance . getWrappedType ( ) , clazz ) ) ; } } catch ( Throwable e ) { // to be ignored } } return result ; }
Method to get all available wrappers .