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 a setter method with the specified argument type.
10505
public static <T extends MethodDescription> ElementMatcher.Junction<T> isSetter(TypeDescription type) {
        return isSetter(is(type));
    }
665188
public static <T extends Tree> Matcher<T> isVoidType() {
    return new Matcher<T>() {
      @Override
      public boolean matches(T t, VisitorState state) {
        Type type = getType(t);
        return type != null && state.getTypes().isSameType(type, state.getSymtab().voidType);
      }
    };
  }
907207
public <T extends Assignable> String getExtensionFromExtensionMapping(final Class<T> type) {
        ExtensionWrapper extensionWrapper = extensionMappings.get(type);
        if (extensionWrapper == null) {
            loadExtensionMapping(type);
        }
        extensionWrapper = extensionMappings.get(type);
        if (extensionWrapper == null) {
            throw UnknownExtensionTypeExceptionDelegator.newExceptionInstance(type);
        }
        return extensionWrapper.getProperty("extension");
    }
1121629
public <T> Map<String, T> findByTypeWithName(Class<T> type) {
        return applicationContext.getBeansOfType(type);
    }
1056193
@Override
    public <T> T addBean(Class<T> type) {
        Bean    beanAnnotation = type.getAnnotation(Bean.class);
        boolean isSingleton    = null == beanAnnotation || beanAnnotation.singleton();
        if (isSingleton) {
            Object bean = put(type, true);
            return type.cast(bean);
        }
        return null;
    }
818297
protected <T> TypeConfiguration<T> type( Class<T> type ) {
        if ( type.isPrimitive() ) {
            throw new IllegalArgumentException( "Type " + type + " is a primitive. Call primitiveType(Class) instead" );
        }
        return new TypeConfiguration<T>( type );
    }
73274
public static boolean isParameterizedType(final Type type) {
        return type != null && type instanceof ParameterizedType && ((ParameterizedType) type).getActualTypeArguments().length > 0;
    }
552490
public static <T extends MethodDescription> ElementMatcher.Junction<T> isGenericSetter(Type type) {
        return isGenericSetter(TypeDefinition.Sort.describe(type));
    }
178797
public static <T extends Tree> Matcher<T> isPrimitiveOrVoidType() {
    return new Matcher<T>() {
      @Override
      public boolean matches(T t, VisitorState state) {
        Type type = getType(t);
        return type != null && type.isPrimitiveOrVoid();
      }
    };
  }
192726
public static <T extends Tree> Matcher<T> isPrimitiveArrayType() {
    return new Matcher<T>() {
      @Override
      public boolean matches(Tree t, VisitorState state) {
        Type type = getType(t);
        return type != null
            && state.getTypes().isArray(type)
            && state.getTypes().elemtype(type).isPrimitive();
      }
    };
  }
1144561
private boolean matches(ParameterizedType requiredType, ParameterizedType beanType) {
        if (!requiredType.getRawType().equals(beanType.getRawType())) {
            return false;
        }
        if (requiredType.getActualTypeArguments().length != beanType.getActualTypeArguments().length) {
            throw new IllegalArgumentException("Invalid argument combination " + requiredType + "; " + beanType);
        }
        for (int i = 0; i < requiredType.getActualTypeArguments().length; i++) {
            if (!parametersMatch(requiredType.getActualTypeArguments()[i], beanType.getActualTypeArguments()[i])) {
                return false;
            }
        }
        return true;
    }
607670
public <T extends Mapping> T getMapping(MappingType type)
    {
        return (T) mappings.get(type);
    }
521154
public void setParameterType(String type) {
		String typeName;
		if (Strings.isEmpty(type)) {
			typeName = Object.class.getName();
		} else {
			typeName = type;
		}
		this.parameter.setParameterType(newTypeRef(this.context, typeName));
	}
1092342
@SuppressWarnings("unchecked")
    public <T extends Tag> Set<T> getOfType(final Class<T> type) {
	read.lock();
	try {
	    final Set<T> tagsOfType = (Set<T>) tags.get(type);
	    return tagsOfType != null ? Collections.unmodifiableSet(tagsOfType) : Collections.emptySet();
	} finally {
	    read.unlock();
	}
    }
1338738
public <T extends Facet> T getFacet(Class<T> type) {
        for (Facet f : facets)
            if(type==f.getClass())
                return type.cast(f);
        return null;
    }
252524
public static <T extends Tree> Matcher<T> isSubtypeOf(Supplier<Type> type) {
    return new IsSubtypeOf<>(type);
  }
502771
public static <T extends FieldDescription> ElementMatcher.Junction<T> fieldType(ElementMatcher<? super TypeDescription> matcher) {
        return genericFieldType(erasure(matcher));
    }