code: public static AnnotationAttributes fromMap(Map<String, Object> map) {
      if (map == null) {
        return null;
      }
  
      if (map instanceof AnnotationAttributes) {
        return (AnnotationAttributes) map;
      }
  
      return new AnnotationAttributes(map);
    }
docs: Return an {@link AnnotationAttributes} instance based on the given map; if the map
  is already an {@code AnnotationAttributes} instance, it is casted and returned
  immediately without creating any new instance; otherwise create a new instance by
  wrapping the map with the {@link #AnnotationAttributes(java.util.Map)} constructor.
  
  @param map original source of annotation attribute key/value pairs
  @return annotation attributes