Matches a field's raw type against the provided matcher.

@param matcher The matcher to apply to the field's type.
@param <T>     The type of the matched object.
@return A matcher matching the provided field type.
502771
public static <T extends FieldDescription> ElementMatcher.Junction<T> fieldType(ElementMatcher<? super TypeDescription> matcher) {
        return genericFieldType(erasure(matcher));
    }
1185711
public static <T extends FieldDescription> ElementMatcher.Junction<T> genericFieldType(ElementMatcher<? super TypeDescription.Generic> matcher) {
        return new FieldTypeMatcher<T>(matcher);
    }
316886
public static <T extends AnnotationDescription> ElementMatcher.Junction<T> annotationType(ElementMatcher<? super TypeDescription> matcher) {
        return new AnnotationTypeMatcher<T>(matcher);
    }
308294
public static <T extends FieldDescription> ElementMatcher.Junction<T> definedField(ElementMatcher<? super FieldDescription.InDefinedShape> matcher) {
        return new DefinedShapeMatcher<T, FieldDescription.InDefinedShape>(matcher);
    }
842885
public static <T extends Tree> Matcher<T> isArrayType() {
    return new Matcher<T>() {
      @Override
      public boolean matches(Tree t, VisitorState state) {
        Type type = getType(t);
        return type != null && state.getTypes().isArray(type);
      }
    };
  }
823388
public static Matcher<JsonElement> isElementValid(final Validator validator, final JsonElement element) {
        return new TypeSafeDiagnosingMatcher<JsonElement>() {
            @Override
            protected boolean matchesSafely(JsonElement item, Description mismatchDescription) {
                if (!validator.isValid(element)) {
                    mismatchDescription.appendText("element: " + element.toString() + ", does not validate by validator " + validator.getTitle());
                    return false;
                }
                return true;
            }

            @Override
            public void describeTo(Description description) {
                description.appendText("is array item valid");
            }
        };
    }
424162
public <T> void checkThat(final T value, final Matcher<T> matcher) {
        checkThat("", value, matcher);
    }
445714
public static Matcher enumDefinition() {
    return new Matcher() {
      @Override public boolean matches(Node node, NodeMetadata metadata) {
        JSType jsType = node.getJSType();
        return jsType != null && jsType.isEnumType();
      }
    };
  }
660829
public <U extends T> OngoingMatchingC0<T, U> when(MatchesExact<U> o) {
    List<Matcher<Object>> matchers = Lists.of(ArgumentMatchers.eq(o.t));
    return new OngoingMatchingC0<>(
        this, new DecomposableMatchBuilder0<>(matchers, new IdentityFieldExtractor<U>()).build());
  }
600387
public static MultiMatcher<MethodTree, VariableTree> methodHasParameters(
      MatchType matchType, Matcher<VariableTree> parameterMatcher) {
    return new MethodHasParameters(matchType, parameterMatcher);
  }
1359516
@SafeVarargs
  public static <T> Matcher<T> anyOf(final Matcher<? super T>... matchers) {
    return new Matcher<T>() {

      @Override
      protected boolean matchesSafely(T object) {
        for (Matcher<? super T> matcher : matchers) {
          if (matcher.matches(object)) {
            return true;
          }
        }
        return false;
      }
    };
  }
105944
public static  Matcher unwrap(Matcher matcher) {
        if (matcher instanceof VarFramingMatcher) {
            VarFramingMatcher varFramingMatcher = (VarFramingMatcher) matcher;
            return unwrap(varFramingMatcher.inner);
        }
        return matcher;
    }
1043550
@SafeVarargs
  public static <T extends Tree> Matcher<T> allOf(final Matcher<? super T>... matchers) {
    return new Matcher<T>() {
      @Override
      public boolean matches(T t, VisitorState state) {
        for (Matcher<? super T> matcher : matchers) {
          if (!matcher.matches(t, state)) {
            return false;
          }
        }
        return true;
      }
    };
  }
1265214
@SafeVarargs
  public static <T> Result<T> match(DefaultCase<T> defaultCase , Case<T>... matchers) {
    return Stream
        .of(matchers)
        .filter(Case::isMatching)
        .map(Case::result)
        .findFirst()
        .orElseGet(defaultCase::result);
  }
227655
static Matcher convertRepeatedAnyCharSeqToIndexOf(Matcher matcher) {
    if (matcher instanceof ZeroOrMoreMatcher) {
      ZeroOrMoreMatcher zm1 = matcher.as();
      Matcher prefix = PatternUtils.getPrefix(zm1.next());
      if (zm1.repeated() instanceof AnyMatcher && prefix instanceof CharSeqMatcher) {
        String pattern = prefix.<CharSeqMatcher>as().pattern();
        Matcher suffix = PatternUtils.getSuffix(zm1.next());
        return new IndexOfMatcher(pattern, suffix);
      }
    }
    return matcher;
  }
746115
public static <T extends ParameterDescription> ElementMatcher.Junction<T> hasGenericType(ElementMatcher<? super TypeDescription.Generic> matcher) {
        return new MethodParameterTypeMatcher<T>(matcher);
    }
603284
@Factory
    public static Matcher<Proc> raisesException(Matcher<? super Exception> matcher) {
        return raises(IsThrowable.exception(matcher));
    }