public static <T>Key<T> of(Class<T> type,Annotation ann){
  Objects.requireNonNull(type);
  Objects.requireNonNull(ann);
  return new Key<>(type,new Annotation[]{ann});
}

public static < T > Key < T > of ( Class < T > type , Annotation ann ) { Objects . requireNonNull ( type ) ; Objects . requireNonNull ( ann ) ; return new Key < > ( type , new Annotation [ ] { ann } ) ; }
builds key from a class and annotation
