@Override public <T>T instance(Key<T> key){
  Objects.requireNonNull(key);
  Class<T> type=(Class)key.rawClass();
  if (type.equals(Provider.class)) {
    TypeRef typeRef=TypeRef.of(key.type());
    TypeRef param=typeRef.param(0);
    return (T)provider(Key.of(param.type()));
  }
  Provider<T> provider=provider(key);
  if (provider != null) {
    return provider.get();
  }
 else {
    return null;
  }
}

@ Override public < T > T instance ( Key < T > key ) { Objects . requireNonNull ( key ) ; Class < T > type = ( Class ) key . rawClass ( ) ; if ( type . equals ( Provider . class ) ) { TypeRef typeRef = TypeRef . of ( key . type ( ) ) ; TypeRef param = typeRef . param ( 0 ) ; return ( T ) provider ( Key . of ( param . type ( ) ) ) ; } Provider < T > provider = provider ( key ) ; if ( provider != null ) { return provider . get ( ) ; } else { return null ; } }
creates a new instance for a given key .
