code: public MappingResult mappingResult(List<BinaryAnnotation> binaryAnnotations) {
          if (binaryAnnotations == null) {
              return new MappingResult();
          }
  
          List<String> componentTypes = new ArrayList<>();
          List<String> endpointTypes = new ArrayList<>();
  
          MappingResult.Builder mappingBuilder = MappingResult.builder();
  
          for (BinaryAnnotation binaryAnnotation: binaryAnnotations) {
              if (binaryAnnotation.getKey() == null) {
                  continue;
              }
  
              BinaryAnnotationMapping mapping = mappingStorage.getKeyBasedMappings().get(binaryAnnotation.getKey());
              if (mapping != null && mapping.isIgnore()) {
                  continue;
              }
  
              if (mapping == null || mapping.getProperty() == null) {
                  // If no mapping, then just store property
                  mappingBuilder.addProperty(new Property(binaryAnnotation.getKey(), binaryAnnotation.getValue(),
                          AnnotationTypeUtil.toPropertyType(binaryAnnotation.getType())));
              }
  
              if (mapping != null) {
                  if (mapping.getComponentType() != null) {
                      componentTypes.add(mapping.getComponentType());
                  }
  
                  if (mapping.getEndpointType() != null) {
                      endpointTypes.add(mapping.getEndpointType());
                  }
  
                  if (mapping.getProperty() != null && !mapping.getProperty().isExclude()) {
                      String key = mapping.getProperty().getKey() != null ? mapping.getProperty().getKey() :
                              binaryAnnotation.getKey();
                      mappingBuilder.addProperty(new Property(key, binaryAnnotation.getValue(),
                              AnnotationTypeUtil.toPropertyType(binaryAnnotation.getType())));
                  }
              }
          }
  
          if (!componentTypes.isEmpty()) {
              mappingBuilder.withComponentType(componentTypes.get(0));
          }
          if (!endpointTypes.isEmpty()) {
              mappingBuilder.withEndpointType(endpointTypes.get(0));
          }
  
          return mappingBuilder.build();
      }
docs: Creates a mapping result from supplied binary annotations.
  
  @param binaryAnnotations binary annotations  of span
  @return mapping result