Java Code Examples for org.springframework.core.convert.TypeDescriptor#nested()

The following examples show how to use org.springframework.core.convert.TypeDescriptor#nested() . 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: BeanWrapperImpl.java    From blog_demos with Apache License 2.0 6 votes vote down vote up
@Override
public TypeDescriptor getPropertyTypeDescriptor(String propertyName) throws BeansException {
	try {
		BeanWrapperImpl nestedBw = getBeanWrapperForPropertyPath(propertyName);
		String finalPath = getFinalPath(nestedBw, propertyName);
		PropertyTokenHolder tokens = getPropertyNameTokens(finalPath);
		PropertyDescriptor pd = nestedBw.getCachedIntrospectionResults().getPropertyDescriptor(tokens.actualName);
		if (pd != null) {
			if (tokens.keys != null) {
				if (pd.getReadMethod() != null || pd.getWriteMethod() != null) {
					return TypeDescriptor.nested(property(pd), tokens.keys.length);
				}
			} else {
				if (pd.getReadMethod() != null || pd.getWriteMethod() != null) {
					return new TypeDescriptor(property(pd));
				}
			}
		}
	}
	catch (InvalidPropertyException ex) {
		// Consider as not determinable.
	}
	return null;
}
 
Example 2
Source File: DirectFieldAccessor.java    From spring-analysis-note with MIT License 4 votes vote down vote up
@Override
@Nullable
public TypeDescriptor nested(int level) {
	return TypeDescriptor.nested(this.field, level);
}
 
Example 3
Source File: BeanWrapperImpl.java    From spring-analysis-note with MIT License 4 votes vote down vote up
@Override
@Nullable
public TypeDescriptor nested(int level) {
	return TypeDescriptor.nested(property(this.pd), level);
}
 
Example 4
Source File: DirectFieldAccessor.java    From java-technology-stack with MIT License 4 votes vote down vote up
@Override
@Nullable
public TypeDescriptor nested(int level) {
	return TypeDescriptor.nested(this.field, level);
}
 
Example 5
Source File: BeanWrapperImpl.java    From java-technology-stack with MIT License 4 votes vote down vote up
@Override
@Nullable
public TypeDescriptor nested(int level) {
	return TypeDescriptor.nested(property(this.pd), level);
}
 
Example 6
Source File: DirectFieldAccessor.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
@Override
public TypeDescriptor nested(int level) {
	return TypeDescriptor.nested(this.field, level);
}
 
Example 7
Source File: BeanWrapperImpl.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
@Override
public TypeDescriptor nested(int level) {
	return TypeDescriptor.nested(property(pd), level);
}
 
Example 8
Source File: DirectFieldAccessor.java    From spring4-understanding with Apache License 2.0 4 votes vote down vote up
@Override
public TypeDescriptor nested(int level) {
	return TypeDescriptor.nested(this.field, level);
}
 
Example 9
Source File: BeanWrapperImpl.java    From spring4-understanding with Apache License 2.0 4 votes vote down vote up
@Override
public TypeDescriptor nested(int level) {
	return TypeDescriptor.nested(property(pd), level);
}