Spring Framework ResolvableType - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Spring Framework ResolvableType class.

This code example shows how to use the following methods:asMap, resolveGeneric
	public DependencyDescriptor(Field field, boolean required, boolean eager) {
		Assert.notNull(field, "Field must not be null");
		this.field = field;
		this.declaringClass = field.getDeclaringClass();
		this.fieldName = field.getName();
		this.required = required;
		this.eager = eager;
	 * Copy constructor. 
	 * @param original the original descriptor to create a copy from 
	public DependencyDescriptor(DependencyDescriptor original) {
		this.methodParameter = (original.methodParameter != null ? new MethodParameter(original.methodParameter) : null);
		this.field = original.field;
		this.declaringClass = original.declaringClass;
		this.containingClass = original.containingClass;
		this.methodName = original.methodName;
		this.parameterTypes = original.parameterTypes;
This code example shows how to use the following methods:getComponentType, isArray, resolve
	 * @param type the backing type or {@code null} if should be resolved 
	 * @param annotations the type annotations 
	protected TypeDescriptor(ResolvableType resolvableType, Class<?> type, Annotation[] annotations) {
		this.resolvableType = resolvableType;
		this.type = (type != null ? type : resolvableType.resolve(Object.class));
		this.annotations = nullSafeAnnotations(annotations);
	private Annotation[] nullSafeAnnotations(Annotation[] annotations) {
		return (annotations != null ? annotations : EMPTY_ANNOTATION_ARRAY);
	 * Variation of {@link #getType()} that accounts for a primitive type by 
	 * returning its object wrapper type. 
	 * <p>This is useful for conversion service implementations that wish to 
	 * normalize to object-based types and not work with primitive types directly. 

See Code Examples for Spring Framework ResolvableType Methods: