code: public String getReferenceSignature(ExecutableElement element) {
      StringBuilder sb = new StringBuilder("(");
  
      // If the method is an inner class constructor, prepend the outer class type.
      if (ElementUtil.isConstructor(element)) {
        TypeElement declaringClass = ElementUtil.getDeclaringClass(element);
        if (ElementUtil.hasOuterContext(declaringClass)) {
          TypeElement outerClass = ElementUtil.getDeclaringClass(declaringClass);
          sb.append(getSignatureName(outerClass.asType()));
        }
      }
  
      for (VariableElement param : element.getParameters()) {
        sb.append(getSignatureName(param.asType()));
      }
  
      sb.append(')');
      TypeMirror returnType = element.getReturnType();
      if (returnType != null) {
        sb.append(getSignatureName(returnType));
      }
      return sb.toString();
    }
docs: Get the "Reference" signature of a method.