Checks if the specified visitor has a visit method compatible with the specified fluent.
@param visitor
@param fluent
@param <V>
@param <F>
@return
197547
private static <V,F> Boolean hasCompatibleVisitMethod(V visitor, F fluent) {
        for (Method method : visitor.getClass().getMethods()) {
            if (!method.getName().equals(VISIT) || method.getParameterTypes().length != 1) {
                continue;
            }
            Class visitorType = method.getParameterTypes()[0];
            if (visitorType.isAssignableFrom(fluent.getClass())) {
                return true;
            } else {
                return false;
            }
        }
        return false;
    }
978492
@Override
    public void accept(ClientlibVisitor visitor, ClientlibVisitor.VisitorMode mode, ClientlibResourceFolder parent) {
        visitor.visit(this, ClientlibVisitor.VisitorMode.DEPENDS, parent);
    }
16238
public <R> void visit(String key, Visitor<T, R> visitor) {
        if (root != null) {
            visit(key, visitor, null, root);
        }
    }
959218
@Override
	public void accept(Visitor<Operator<?>> visitor) {
		boolean descend = visitor.preVisit(this);
		if (descend) {
			this.input1.accept(visitor);
			this.input2.accept(visitor);
			for (Operator<?> c : this.broadcastInputs.values()) {
				c.accept(visitor);
			}
			visitor.postVisit(this);
		}
	}
12081
public FluentMatchingR<T, R> get(Function<A, R> function) {
    return get(fluentMatchingR, function);
  }
126464
@Override
    protected <R, C> R accept(AstVisitor<R, C> visitor, C context)
    {
        return visitor.visitExpression(this, context);
    }
211473
@Override
	public <R, D> R accept(DuzztREVisitor<R, D> visitor, D data) {
		return visitor.visit(this, data);
	}
385678
public void visitWith(ExecArg.Visitor visitor) {
        for (ExecArg arg : getList()) {
            arg.accept(visitor);
        }
    }
912181
public Object accept(QueryNodeVisitor visitor, Object data) throws RepositoryException {
        return visitor.visit(this, data);
    }
393049
public static <T1, T2, T3, R> FluentFunctions.FluentTriFunction<T1, T2, T3, R> of(final Function3<T1, T2, T3, R> fn) {
        return new FluentTriFunction<>(
                                       fn);
    }
667153
@Override
  public Description matchMethodInvocation(MethodInvocationTree tree, VisitorState state) {
    MatchResult directResult = firstNonNullMatchResult(DIRECT_MATCHERS, tree, state);
    MatchResult typeArgResult = null;
    if (directResult == null) {
      typeArgResult = firstNonNullMatchResult(TYPE_ARG_MATCHERS, tree, state);
    }
    if (directResult == null && typeArgResult == null) {
      return Description.NO_MATCH;
    }
    Verify.verify(directResult == null ^ typeArgResult == null);
    MatchResult result = MoreObjects.firstNonNull(directResult, typeArgResult);

    Types types = state.getTypes();
    TypeCompatibilityReport compatibilityReport =
        EqualsIncompatibleType.compatibilityOfTypes(
            result.targetType(), result.sourceType(), state);
    if (compatibilityReport.compatible()) {
      return Description.NO_MATCH;
    }

    // For error message, use simple names instead of fully qualified names unless they are
    // identical.
    String sourceTreeType = Signatures.prettyType(ASTHelpers.getType(result.sourceTree()));
    String sourceType = Signatures.prettyType(result.sourceType());
    String targetType = Signatures.prettyType(result.targetType());
    if (sourceType.equals(targetType)) {
      sourceType = result.sourceType().toString();
      targetType = result.targetType().toString();
    }

    Description.Builder description = buildDescription(tree);
    if (typeArgResult != null) {
      description.setMessage(
          String.format(
              "Argument '%s' should not be passed to this method; its type %s has a type argument "
                  + "%s that is not compatible with its collection's type argument %s",
              result.sourceTree(), sourceTreeType, sourceType, targetType));
    } else {
      description.setMessage(
          String.format(
              "Argument '%s' should not be passed to this method; its type %s is not compatible "
                  + "with its collection's type argument %s",
              result.sourceTree(), sourceType, targetType));
    }

    switch (fixType) {
      case PRINT_TYPES_AS_COMMENT:
        description.addFix(
            SuggestedFix.prefixWith(
                tree,
                String.format(
                    "/* expected: %s, actual: %s */",
                    ASTHelpers.getUpperBound(result.targetType(), types), result.sourceType())));
        break;
      case CAST:
        Fix fix;
        if (typeArgResult != null) {
          TypeArgOfMethodArgMatcher matcher = (TypeArgOfMethodArgMatcher) typeArgResult.matcher();
          String fullyQualifiedType = matcher.getMethodArgTypeName();
          String simpleType = Iterables.getLast(Splitter.on('.').split(fullyQualifiedType));
          fix =
              SuggestedFix.builder()
                  .prefixWith(result.sourceTree(), String.format("(%s<?>) ", simpleType))
                  .addImport(fullyQualifiedType)
                  .build();
        } else {
          fix = SuggestedFix.prefixWith(result.sourceTree(), "(Object) ");
        }
        description.addFix(fix);
        break;
      case SUPPRESS_WARNINGS:
        SuggestedFix.Builder builder = SuggestedFix.builder();
        builder.prefixWith(
            result.sourceTree(),
            String.format("/* expected: %s, actual: %s */ ", targetType, sourceType));
        addSuppressWarnings(builder, state, "CollectionIncompatibleType");
        description.addFix(builder.build());
        break;
      case NONE:
        break;
    }

    return description.build();
  }
781893
public ClassNode visitPublicNotAbstractAnnotatedClasses($.Visitor<ClassNode> visitor) {
        return visitAnnotatedClasses($.guardedVisitor(new $.Predicate<ClassNode>() {
            @Override
            public boolean test(ClassNode classNode) {
                return classNode.publicNotAbstract();
            }
        }, visitor));
    }
1348330
public synchronized void accept(CacheVisitor<K,V> visitor) {
        expungeExpiredEntries();
        Map<K,V> cached = getCachedEntries();

        visitor.visit(cached);
    }
91515
public ClassNode visitAnnotatedClasses($.Visitor<ClassNode> visitor) {
        for (ClassNode annotated : this.annotated) {
            visitor.apply(annotated);
        }
        return this;
    }
734787
public static <T, R> FluentFunctions.FluentFunction<T, R> of(final Function<T, R> fn) {
        return new FluentFunction<>(
                                    fn);
    }
1018298
public static <T1, T2, T3, R> FluentFunctions.FluentTriFunction<T1, T2, T3, R> ofChecked(final CheckedTriFunction<T1, T2, T3, R> fn) {

        return new FluentTriFunction<>(
                                       softenTriFunction(fn));
    }
1246685
public static <T1, T2, R> FluentFunctions.FluentBiFunction<T1, T2, R> ofChecked(final CheckedBiFunction<T1, T2, R> fn) {
        return FluentFunctions.of(ExceptionSoftener.softenBiFunction(fn));
    }