org.springframework.core.SerializableTypeWrapper.FieldTypeProvider Java Examples

The following examples show how to use org.springframework.core.SerializableTypeWrapper.FieldTypeProvider. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ResolvableType.java    From spring-analysis-note with MIT License 3 votes vote down vote up
/**
 * Return a {@link ResolvableType} for the specified {@link Field} with a given
 * implementation.
 * <p>Use this variant when the class that declares the field includes generic
 * parameter variables that are satisfied by the implementation type.
 * @param field the source field
 * @param implementationType the implementation type
 * @return a {@link ResolvableType} for the specified field
 * @see #forField(Field)
 */
public static ResolvableType forField(Field field, @Nullable ResolvableType implementationType) {
	Assert.notNull(field, "Field must not be null");
	ResolvableType owner = (implementationType != null ? implementationType : NONE);
	owner = owner.as(field.getDeclaringClass());
	return forType(null, new FieldTypeProvider(field), owner.asVariableResolver());
}
 
Example #2
Source File: ResolvableType.java    From spring4-understanding with Apache License 2.0 3 votes vote down vote up
/**
 * Return a {@link ResolvableType} for the specified {@link Field} with a given
 * implementation.
 * <p>Use this variant when the class that declares the field includes generic
 * parameter variables that are satisfied by the implementation type.
 * @param field the source field
 * @param implementationType the implementation type
 * @return a {@link ResolvableType} for the specified field
 * @see #forField(Field)
 */
public static ResolvableType forField(Field field, ResolvableType implementationType) {
	Assert.notNull(field, "Field must not be null");
	implementationType = (implementationType == null ? NONE : implementationType);
	ResolvableType owner = implementationType.as(field.getDeclaringClass());
	return forType(null, new FieldTypeProvider(field), owner.asVariableResolver());
}
 
Example #3
Source File: ResolvableType.java    From java-technology-stack with MIT License 3 votes vote down vote up
/**
 * Return a {@link ResolvableType} for the specified {@link Field} with a given
 * implementation.
 * <p>Use this variant when the class that declares the field includes generic
 * parameter variables that are satisfied by the implementation type.
 * @param field the source field
 * @param implementationType the implementation type
 * @return a {@link ResolvableType} for the specified field
 * @see #forField(Field)
 */
public static ResolvableType forField(Field field, @Nullable ResolvableType implementationType) {
	Assert.notNull(field, "Field must not be null");
	ResolvableType owner = (implementationType != null ? implementationType : NONE);
	owner = owner.as(field.getDeclaringClass());
	return forType(null, new FieldTypeProvider(field), owner.asVariableResolver());
}
 
Example #4
Source File: ResolvableType.java    From lams with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Return a {@link ResolvableType} for the specified {@link Field} with a given
 * implementation.
 * <p>Use this variant when the class that declares the field includes generic
 * parameter variables that are satisfied by the implementation type.
 * @param field the source field
 * @param implementationType the implementation type
 * @return a {@link ResolvableType} for the specified field
 * @see #forField(Field)
 */
public static ResolvableType forField(Field field, ResolvableType implementationType) {
	Assert.notNull(field, "Field must not be null");
	ResolvableType owner = (implementationType != null ? implementationType : NONE);
	owner = owner.as(field.getDeclaringClass());
	return forType(null, new FieldTypeProvider(field), owner.asVariableResolver());
}
 
Example #5
Source File: ResolvableType.java    From lams with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Return a {@link ResolvableType} for the specified {@link Field}.
 * @param field the source field
 * @return a {@link ResolvableType} for the specified field
 * @see #forField(Field, Class)
 */
public static ResolvableType forField(Field field) {
	Assert.notNull(field, "Field must not be null");
	return forType(null, new FieldTypeProvider(field), null);
}
 
Example #6
Source File: ResolvableType.java    From spring4-understanding with Apache License 2.0 2 votes vote down vote up
/**
 * Return a {@link ResolvableType} for the specified {@link Field} with a given
 * implementation and the given nesting level.
 * <p>Use this variant when the class that declares the field includes generic
 * parameter variables that are satisfied by the implementation class.
 * @param field the source field
 * @param nestingLevel the nesting level (1 for the outer level; 2 for a nested
 * generic type; etc)
 * @param implementationClass the implementation class
 * @return a {@link ResolvableType} for the specified field
 * @see #forField(Field)
 */
public static ResolvableType forField(Field field, int nestingLevel, Class<?> implementationClass) {
	Assert.notNull(field, "Field must not be null");
	ResolvableType owner = forType(implementationClass).as(field.getDeclaringClass());
	return forType(null, new FieldTypeProvider(field), owner.asVariableResolver()).getNested(nestingLevel);
}
 
Example #7
Source File: ResolvableType.java    From spring4-understanding with Apache License 2.0 2 votes vote down vote up
/**
 * Return a {@link ResolvableType} for the specified {@link Field} with the
 * given nesting level.
 * @param field the source field
 * @param nestingLevel the nesting level (1 for the outer level; 2 for a nested
 * generic type; etc)
 * @see #forField(Field)
 */
public static ResolvableType forField(Field field, int nestingLevel) {
	Assert.notNull(field, "Field must not be null");
	return forType(null, new FieldTypeProvider(field), null).getNested(nestingLevel);
}
 
Example #8
Source File: ResolvableType.java    From spring4-understanding with Apache License 2.0 2 votes vote down vote up
/**
 * Return a {@link ResolvableType} for the specified {@link Field} with a given
 * implementation.
 * <p>Use this variant when the class that declares the field includes generic
 * parameter variables that are satisfied by the implementation class.
 * @param field the source field
 * @param implementationClass the implementation class
 * @return a {@link ResolvableType} for the specified field
 * @see #forField(Field)
 */
public static ResolvableType forField(Field field, Class<?> implementationClass) {
	Assert.notNull(field, "Field must not be null");
	ResolvableType owner = forType(implementationClass).as(field.getDeclaringClass());
	return forType(null, new FieldTypeProvider(field), owner.asVariableResolver());
}
 
Example #9
Source File: ResolvableType.java    From spring4-understanding with Apache License 2.0 2 votes vote down vote up
/**
 * Return a {@link ResolvableType} for the specified {@link Field}.
 * @param field the source field
 * @return a {@link ResolvableType} for the specified field
 * @see #forField(Field, Class)
 */
public static ResolvableType forField(Field field) {
	Assert.notNull(field, "Field must not be null");
	return forType(null, new FieldTypeProvider(field), null);
}
 
Example #10
Source File: ResolvableType.java    From lams with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Return a {@link ResolvableType} for the specified {@link Field} with a given
 * implementation and the given nesting level.
 * <p>Use this variant when the class that declares the field includes generic
 * parameter variables that are satisfied by the implementation class.
 * @param field the source field
 * @param nestingLevel the nesting level (1 for the outer level; 2 for a nested
 * generic type; etc)
 * @param implementationClass the implementation class
 * @return a {@link ResolvableType} for the specified field
 * @see #forField(Field)
 */
public static ResolvableType forField(Field field, int nestingLevel, Class<?> implementationClass) {
	Assert.notNull(field, "Field must not be null");
	ResolvableType owner = forType(implementationClass).as(field.getDeclaringClass());
	return forType(null, new FieldTypeProvider(field), owner.asVariableResolver()).getNested(nestingLevel);
}
 
Example #11
Source File: ResolvableType.java    From lams with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Return a {@link ResolvableType} for the specified {@link Field} with the
 * given nesting level.
 * @param field the source field
 * @param nestingLevel the nesting level (1 for the outer level; 2 for a nested
 * generic type; etc)
 * @see #forField(Field)
 */
public static ResolvableType forField(Field field, int nestingLevel) {
	Assert.notNull(field, "Field must not be null");
	return forType(null, new FieldTypeProvider(field), null).getNested(nestingLevel);
}
 
Example #12
Source File: ResolvableType.java    From lams with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Return a {@link ResolvableType} for the specified {@link Field} with a given
 * implementation.
 * <p>Use this variant when the class that declares the field includes generic
 * parameter variables that are satisfied by the implementation class.
 * @param field the source field
 * @param implementationClass the implementation class
 * @return a {@link ResolvableType} for the specified field
 * @see #forField(Field)
 */
public static ResolvableType forField(Field field, Class<?> implementationClass) {
	Assert.notNull(field, "Field must not be null");
	ResolvableType owner = forType(implementationClass).as(field.getDeclaringClass());
	return forType(null, new FieldTypeProvider(field), owner.asVariableResolver());
}
 
Example #13
Source File: ResolvableType.java    From spring-analysis-note with MIT License 2 votes vote down vote up
/**
 * Return a {@link ResolvableType} for the specified {@link Field}.
 * @param field the source field
 * @return a {@link ResolvableType} for the specified field
 * @see #forField(Field, Class)
 */
public static ResolvableType forField(Field field) {
	Assert.notNull(field, "Field must not be null");
	return forType(null, new FieldTypeProvider(field), null);
}
 
Example #14
Source File: ResolvableType.java    From java-technology-stack with MIT License 2 votes vote down vote up
/**
 * Return a {@link ResolvableType} for the specified {@link Field} with a given
 * implementation and the given nesting level.
 * <p>Use this variant when the class that declares the field includes generic
 * parameter variables that are satisfied by the implementation class.
 * @param field the source field
 * @param nestingLevel the nesting level (1 for the outer level; 2 for a nested
 * generic type; etc)
 * @param implementationClass the implementation class
 * @return a {@link ResolvableType} for the specified field
 * @see #forField(Field)
 */
public static ResolvableType forField(Field field, int nestingLevel, @Nullable Class<?> implementationClass) {
	Assert.notNull(field, "Field must not be null");
	ResolvableType owner = forType(implementationClass).as(field.getDeclaringClass());
	return forType(null, new FieldTypeProvider(field), owner.asVariableResolver()).getNested(nestingLevel);
}
 
Example #15
Source File: ResolvableType.java    From java-technology-stack with MIT License 2 votes vote down vote up
/**
 * Return a {@link ResolvableType} for the specified {@link Field} with the
 * given nesting level.
 * @param field the source field
 * @param nestingLevel the nesting level (1 for the outer level; 2 for a nested
 * generic type; etc)
 * @see #forField(Field)
 */
public static ResolvableType forField(Field field, int nestingLevel) {
	Assert.notNull(field, "Field must not be null");
	return forType(null, new FieldTypeProvider(field), null).getNested(nestingLevel);
}
 
Example #16
Source File: ResolvableType.java    From java-technology-stack with MIT License 2 votes vote down vote up
/**
 * Return a {@link ResolvableType} for the specified {@link Field} with a given
 * implementation.
 * <p>Use this variant when the class that declares the field includes generic
 * parameter variables that are satisfied by the implementation class.
 * @param field the source field
 * @param implementationClass the implementation class
 * @return a {@link ResolvableType} for the specified field
 * @see #forField(Field)
 */
public static ResolvableType forField(Field field, Class<?> implementationClass) {
	Assert.notNull(field, "Field must not be null");
	ResolvableType owner = forType(implementationClass).as(field.getDeclaringClass());
	return forType(null, new FieldTypeProvider(field), owner.asVariableResolver());
}
 
Example #17
Source File: ResolvableType.java    From java-technology-stack with MIT License 2 votes vote down vote up
/**
 * Return a {@link ResolvableType} for the specified {@link Field}.
 * @param field the source field
 * @return a {@link ResolvableType} for the specified field
 * @see #forField(Field, Class)
 */
public static ResolvableType forField(Field field) {
	Assert.notNull(field, "Field must not be null");
	return forType(null, new FieldTypeProvider(field), null);
}
 
Example #18
Source File: ResolvableType.java    From spring-analysis-note with MIT License 2 votes vote down vote up
/**
 * Return a {@link ResolvableType} for the specified {@link Field} with a given
 * implementation and the given nesting level.
 * <p>Use this variant when the class that declares the field includes generic
 * parameter variables that are satisfied by the implementation class.
 * @param field the source field
 * @param nestingLevel the nesting level (1 for the outer level; 2 for a nested
 * generic type; etc)
 * @param implementationClass the implementation class
 * @return a {@link ResolvableType} for the specified field
 * @see #forField(Field)
 */
public static ResolvableType forField(Field field, int nestingLevel, @Nullable Class<?> implementationClass) {
	Assert.notNull(field, "Field must not be null");
	ResolvableType owner = forType(implementationClass).as(field.getDeclaringClass());
	return forType(null, new FieldTypeProvider(field), owner.asVariableResolver()).getNested(nestingLevel);
}
 
Example #19
Source File: ResolvableType.java    From spring-analysis-note with MIT License 2 votes vote down vote up
/**
 * Return a {@link ResolvableType} for the specified {@link Field} with the
 * given nesting level.
 * @param field the source field
 * @param nestingLevel the nesting level (1 for the outer level; 2 for a nested
 * generic type; etc)
 * @see #forField(Field)
 */
public static ResolvableType forField(Field field, int nestingLevel) {
	Assert.notNull(field, "Field must not be null");
	return forType(null, new FieldTypeProvider(field), null).getNested(nestingLevel);
}
 
Example #20
Source File: ResolvableType.java    From spring-analysis-note with MIT License 2 votes vote down vote up
/**
 * Return a {@link ResolvableType} for the specified {@link Field} with a given
 * implementation.
 * <p>Use this variant when the class that declares the field includes generic
 * parameter variables that are satisfied by the implementation class.
 * @param field the source field
 * @param implementationClass the implementation class
 * @return a {@link ResolvableType} for the specified field
 * @see #forField(Field)
 */
public static ResolvableType forField(Field field, Class<?> implementationClass) {
	Assert.notNull(field, "Field must not be null");
	ResolvableType owner = forType(implementationClass).as(field.getDeclaringClass());
	return forType(null, new FieldTypeProvider(field), owner.asVariableResolver());
}