Matches any Java bean setter method which takes an argument the given type.

@param type The required setter type.
@param <T>  The type of the matched object.
@return A matcher that matches any setter method.
552490
public static <T extends MethodDescription> ElementMatcher.Junction<T> isGenericSetter(Type type) {
        return isGenericSetter(TypeDefinition.Sort.describe(type));
    }
643087
public static <T extends FieldDescription> ElementMatcher.Junction<T> genericFieldType(TypeDescription.Generic fieldType) {
        return genericFieldType(is(fieldType));
    }
746115
public static <T extends ParameterDescription> ElementMatcher.Junction<T> hasGenericType(ElementMatcher<? super TypeDescription.Generic> matcher) {
        return new MethodParameterTypeMatcher<T>(matcher);
    }
1121629
public <T> Map<String, T> findByTypeWithName(Class<T> type) {
        return applicationContext.getBeansOfType(type);
    }
680899
public static boolean isJavaConstantType(TypeMirror type)
    {
        switch (type.getKind())
        {
            case INT:
            case LONG:
            case FLOAT:
            case DOUBLE:
                return true;
            case DECLARED:
                DeclaredType dt = (DeclaredType) type;
                TypeElement te = (TypeElement) dt.asElement();
                return "java.lang.String".contentEquals(te.getQualifiedName());
            default:
                return false;
        }
    }
577639
public <T> Map<String, T> findByTypeWithName(Class<T> type) {
        return BeanFactoryUtils.beansOfTypeIncludingAncestors(applicationContext, type);
    }
371538
public <T> T toObject(Class<T> type) {
        Collection<PropertyDescriptor> accessibleProperties = getAccessiblePropertiesFromBean(type);
        T bean;
        try {
            bean = type.newInstance();
            for (PropertyDescriptor d : accessibleProperties) {
                doSetPropertyOnBean(bean, d);
            }
            return bean;
        } catch (InstantiationException e) {
            throw new IllegalStateException(e);
        } catch (IllegalAccessException e) {
            throw new IllegalStateException(e);
        } catch (InvocationTargetException e) {
            throw new IllegalStateException(e);
        }
    }
600387
public static MultiMatcher<MethodTree, VariableTree> methodHasParameters(
      MatchType matchType, Matcher<VariableTree> parameterMatcher) {
    return new MethodHasParameters(matchType, parameterMatcher);
  }
798735
public void setType(TYPE type) {
    if(type == null) {
      type = TYPE.UNSET;
    }
    this.type = type;
  }
639448
@SuppressWarnings("unchecked")
    public static <T> T argThat(Matcher<T> matcher) {
        reportMatcher(matcher);
        return  (T) defaultValue(genericTypeOfMatcher(matcher.getClass()));
    }
962638
public <T> EqualsVerifierApi<T> forClass(Class<T> type) {
        return new EqualsVerifierApi<>(type, EnumSet.copyOf(warningsToSuppress), factoryCache, usingGetClass);
    }
701720
public static Class<?> getTypeParameter(Class<?> genericType, Class<?> type) {
        Type[] genericInterfaces = type.getGenericInterfaces();
        for (Type genericInterface : genericInterfaces) {
            if (genericInterface instanceof ParameterizedType) {
                ParameterizedType parameterizedType = (ParameterizedType) genericInterface;
                if (genericType.equals(parameterizedType.getRawType())) {
                    Type typeParameter = ((ParameterizedType) genericInterface).getActualTypeArguments()[0];
                    if (typeParameter instanceof Class<?>) {
                        return (Class<?>) typeParameter;
                    }
                }
            }
        }
        return null;
    }
479942
protected void findMatching(Class<? extends T> type, BiPredicate<Class<? extends T>, D> predicate)
	{
		traverseType(type, predicate, new HashSet<>());
	}
1169785
public List<MethodParameter> getParametersOfType(Class<?> type) {

		Assert.notNull(type, "Type must not be null!");

		return getParameters().stream() //
				.filter(it -> it.getParameterType().equals(type)) //
				.collect(Collectors.toList());
	}
54012
public <T extends Annotation> T getAnnotation(Class<T> type) {
    return member.getAnnotation(type);
  }
359756
public static <T extends FieldDescription> ElementMatcher.Junction<T> fieldType(TypeDescription fieldType) {
        return fieldType(is(fieldType));
    }
646985
public static <T extends TypeDefinition> ElementMatcher.Junction<T> ofSort(ElementMatcher<? super TypeDefinition.Sort> matcher) {
        return new TypeSortMatcher<T>(matcher);
    }