@ SuppressWarnings ( "unchecked" ) private static void injectInnerComponent ( final Component < ? > component , final Field field , final Object ... keyParts ) { final ParameterizedType innerComponentType = ( ParameterizedType ) field . getGenericType ( ) ; final Class < ? > componentType = ( Class < ? > ) innerComponentType . getActualTypeArguments ( ) [ 0 ] ; try { ClassUtility . setFieldValue ( field , component , CBuilder . innerComponent ( ( Class < Command > ) componentType , keyParts ) . host ( component ) ) ; } catch ( IllegalArgumentException | CoreException e ) { LOGGER . error ( COMPONENT_INJECTION_FAILURE , component . getClass ( ) , e ) ; } }
Inject Inner component .