code: public static LanguageElement getLanguageElement(CompositeObject descriptor) {
          Queue<Class<?>> queue = new LinkedList<>();
          Class<?>[] descriptorTypes = descriptor.getClass().getInterfaces();
          do {
              queue.addAll(Arrays.asList(descriptorTypes));
              Class<?> descriptorType = queue.poll();
              AnnotatedType annotatedType = new AnnotatedType(descriptorType);
              Annotation languageAnnotation = annotatedType.getByMetaAnnotation(Language.class);
              if (languageAnnotation != null) {
                  return getAnnotationValue(languageAnnotation, "value", LanguageElement.class);
              }
              descriptorTypes = descriptorType.getInterfaces();
          }
          while (!queue.isEmpty());
          return null;
      }
docs: Return the {@link LanguageElement} associated with a {@link CompositeObject}.
  
  The method uses a breadth-first-search to identify a descriptor type annotated with {@link LanguageElement}.
  
  @param descriptor
  The descriptor.
  @return The resolved {@link LanguageElement}