code: protected boolean checkIfClassHasNoargsConstructor(TypeElement typeElement) {
  
          // check if annotated class has noargs constructor
          boolean foundConstructor = false;
          boolean foundNoargsConstructor = false;
  
          for (Element child : typeElement.getEnclosedElements()) {
              if (ElementKind.CONSTRUCTOR.equals(child.getKind())) {
                  foundConstructor = true;
                  ExecutableElement constructor = (ExecutableElement) child;
                  if (constructor.getParameters().size() == 0) {
                      foundNoargsConstructor = true;
                      break;
                  }
              }
          }
          return !(foundConstructor && !foundNoargsConstructor);
  
      }
docs: Checks if class has noargs constructor or default noargs constructor.
  
  @param typeElement the type element to check.
  @return true if element has noarg constructor or no constructor at all