code: public static Optional<MethodUsage> getFunctionalMethod(ResolvedType type) {
          if (type.isReferenceType() && type.asReferenceType().getTypeDeclaration().isInterface()) {
              return getFunctionalMethod(type.asReferenceType().getTypeDeclaration());
          } else {
              return Optional.empty();
          }
      }
docs: Get the functional method defined by the type, if any.