private static Type [ ] extractTypeArgumentsFrom ( final Map < TypeVariable < ? > , Type > mappings , final TypeVariable < ? > [ ] variables ) { final Type [ ] result = new Type [ variables . length ] ; int index = 0 ; for ( final TypeVariable < ? > var : variables ) { Validate . isTrue ( mappings . containsKey ( var ) , "missing argument mapping for %s" , toString ( var ) ) ; result [ index ++ ] = mappings . get ( var ) ; } return result ; }
Helper method to establish the formal parameters for a parameterized type .