Top Description Constructors Methods
org.springframework.expression.spel.ast

public abstract Class AstUtils

extends Object
Class Inheritance
Imports
java.util.ArrayList, .List, org.springframework.expression.PropertyAccessor, org.springframework.lang.Nullable

Utilities methods for use in the Ast classes.
Author
Andy Clement
Since
3.0.2

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static List<PropertyAccessor>

Returns:

a list of resolvers that should be tried in order to access the property
getPropertyAccessorsToTry
(Class<?>
the type upon which property access is being attempted
targetType
,
List<PropertyAccessor> propertyAccessors)

Determines the set of property resolvers that should be used to try and access a property on the specified target type.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

AstUtilsback to summary
public AstUtils()

Method Detail

getPropertyAccessorsToTryback to summary
public static List<PropertyAccessor> getPropertyAccessorsToTry(Class<?> targetType, List<PropertyAccessor> propertyAccessors)

Determines the set of property resolvers that should be used to try and access a property on the specified target type. The resolvers are considered to be in an ordered list, however in the returned list any that are exact matches for the input target type (as opposed to 'general' resolvers that could work for any type) are placed at the start of the list. In addition, there are specific resolvers that exactly name the class in question and resolvers that name a specific class but it is a supertype of the class we have. These are put at the end of the specific resolvers set and will be tried after exactly matching accessors but before generic accessors.

Parameters
targetType:Class<?>

the type upon which property access is being attempted

Returns:List<PropertyAccessor>

a list of resolvers that should be tried in order to access the property