Class PropertyResolverImpl

java.lang.Object
jakarta.faces.el.PropertyResolver
com.sun.faces.el.PropertyResolverImpl

public class PropertyResolverImpl
extends PropertyResolver

Concrete implementation of PropertyResolver.

  • Constructor Details

  • Method Details

    • getType

      public Class getType​(Object base, int index) throws EvaluationException, PropertyNotFoundException
      Description copied from class: PropertyResolver

      Return the java.lang.Class representing the type of the specified index.

      Specified by:
      getType in class PropertyResolver
      Parameters:
      base - The base object whose property is to be analyzed
      index - The index of the value whose type is to be returned
      Returns:
      The java.lang.Class representing the type of value at the specified index of the specified base object, if it can be determined; otherwise null
      Throws:
      EvaluationException - if an exception is thrown while testing the property (the thrown exception must be included as the cause property of this exception)
      PropertyNotFoundException - if the index is out of bounds or if base is null
    • getType

      public Class getType​(Object base, Object property)
      Description copied from class: PropertyResolver

      Return the java.lang.Class representing the type of the specified property. An instance of any Object of that type my be set as the value of that property, as long as the property is not read-only. The actual value of the property, if non-null, is guaranteed to be an instance of this type, or an instance of a subclass of this type. This method is also useful for discovering the type of Objects that may be set as the value of the property.

      For a bean base object, the property is coerced to a String and used as the property name. For all other base object types (e.g., a Map), the property is used without any coercing.

      Specified by:
      getType in class PropertyResolver
      Parameters:
      base - The base object whose property is to be analyzed
      property - The property to be analyzed
      Returns:
      the java.lang.Class representing the type of the specified property of the specified base object, if it can be determined; otherwise null
    • getValue

      public Object getValue​(Object base, int index)
      Description copied from class: PropertyResolver

      Return the value at the specified index of the specified base object.

      Specified by:
      getValue in class PropertyResolver
      Parameters:
      base - The base object whose property value is to be returned
      index - The index of the value to return
      Returns:
      The property value, or null if base is null, or if the index is out of bounds for the base object
    • getValue

      public Object getValue​(Object base, Object property)
      Description copied from class: PropertyResolver

      Return the value of the specified property from the specified base object.

      For a bean base object, the property is coerced to a String and used as the property name. For all other base object types (e.g., a Map), the property is used without any coercing.

      Specified by:
      getValue in class PropertyResolver
      Parameters:
      base - The base object whose property value is to be returned
      property - The property to be returned
      Returns:
      The property value, or null if base or property is null, or if the property doesn't exist and the base object is a Map instance
    • isReadOnly

      public boolean isReadOnly​(Object base, int index)
      Description copied from class: PropertyResolver

      Checks if the specified index is read-only.

      Specified by:
      isReadOnly in class PropertyResolver
      Parameters:
      base - The base object whose property is to be analyzed
      index - The index of the value whose type is to be returned
      Returns:
      true if the value at the specified index of the specified base object is known to be immutable; otherwise, false
    • isReadOnly

      public boolean isReadOnly​(Object base, Object property)
      Description copied from class: PropertyResolver

      Checks if the specified property is read-only.

      For a bean base object, the property is coerced to a String and used as the property name. For all other base object types (e.g., a Map), the property is used without any coercing.

      Specified by:
      isReadOnly in class PropertyResolver
      Parameters:
      base - The base object whose property is to be analyzed
      property - The property to be analyzed
      Returns:
      true if the specified property of the specified base object is known to be immutable; otherwise false
    • setValue

      public void setValue​(Object base, int index, Object value)
      Description copied from class: PropertyResolver

      Set the value at the specified index of the specified base object.

      Specified by:
      setValue in class PropertyResolver
      Parameters:
      base - The base object whose property value is to be set
      index - The index of the value to set
      value - The value to be set
    • setValue

      public void setValue​(Object base, Object property, Object value)
      Description copied from class: PropertyResolver

      Set the specified value of the specified property on the specified base object.

      For a bean base object, the property is coerced to a String and used as the property name. For all other base object types (e.g., a Map), the property is used without any coercing.

      Specified by:
      setValue in class PropertyResolver
      Parameters:
      base - The base object whose property value is to be set
      property - The property to be set
      value - The value of the property to be set
    • setDelegate

      public void setDelegate​(PropertyResolver delegate)
    • assertInput

      protected static void assertInput​(Object base, Object property) throws PropertyNotFoundException
      Throws:
      PropertyNotFoundException
    • assertInput

      protected static void assertInput​(Object base, int index) throws PropertyNotFoundException
      Throws:
      PropertyNotFoundException