org.springframework.expression.spel.ast

Class AstUtils

  • java.lang.Object
    • org.springframework.expression.spel.ast.AstUtils


  • public abstract class AstUtils
    extends java.lang.Object
    Utilities methods for use in the Ast classes.
    Since:
    3.0.2
    Author:
    Andy Clement
    • Constructor Summary

      Constructors 
      Constructor and Description
      AstUtils() 
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static java.util.List<PropertyAccessor> getPropertyAccessorsToTry(java.lang.Class<?> targetType, java.util.List<PropertyAccessor> propertyAccessors)
      Determines the set of property resolvers that should be used to try and access a property on the specified target type.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AstUtils

        public AstUtils()
    • Method Detail

      • getPropertyAccessorsToTry

        public static java.util.List<PropertyAccessor> getPropertyAccessorsToTry(@Nullable
                                                                                 java.lang.Class<?> targetType,
                                                                                 java.util.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 - the type upon which property access is being attempted
        Returns:
        a list of resolvers that should be tried in order to access the property