Java Code Examples for org.springframework.expression.MethodResolver#getClass()

The following examples show how to use org.springframework.expression.MethodResolver#getClass() . 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: SimpleEvaluationContext.java    From spring-analysis-note with MIT License 5 votes vote down vote up
/**
 * Register the specified {@link MethodResolver} delegates for
 * a combination of property access and method resolution.
 * @param resolvers the resolver delegates to use
 * @see #withInstanceMethods()
 * @see SimpleEvaluationContext#forPropertyAccessors
 */
public Builder withMethodResolvers(MethodResolver... resolvers) {
	for (MethodResolver resolver : resolvers) {
		if (resolver.getClass() == ReflectiveMethodResolver.class) {
			throw new IllegalArgumentException("SimpleEvaluationContext is not designed for use with a plain " +
					"ReflectiveMethodResolver. Consider using DataBindingMethodResolver or a custom subclass.");
		}
	}
	this.resolvers = Arrays.asList(resolvers);
	return this;
}
 
Example 2
Source File: SimpleEvaluationContext.java    From java-technology-stack with MIT License 5 votes vote down vote up
/**
 * Register the specified {@link MethodResolver} delegates for
 * a combination of property access and method resolution.
 * @param resolvers the resolver delegates to use
 * @see #withInstanceMethods()
 * @see SimpleEvaluationContext#forPropertyAccessors
 */
public Builder withMethodResolvers(MethodResolver... resolvers) {
	for (MethodResolver resolver : resolvers) {
		if (resolver.getClass() == ReflectiveMethodResolver.class) {
			throw new IllegalArgumentException("SimpleEvaluationContext is not designed for use with a plain " +
					"ReflectiveMethodResolver. Consider using DataBindingMethodResolver or a custom subclass.");
		}
	}
	this.resolvers = Arrays.asList(resolvers);
	return this;
}