Class MapGetExecutor

    • Field Detail

      • MAP_GET

        private static final java.lang.reflect.Method MAP_GET
        The java.util.map.get method used as an active marker in MapGet.
      • property

        private final java.lang.Object property
        The property.
    • Constructor Detail

      • MapGetExecutor

        private MapGetExecutor​(java.lang.Class<?> clazz,
                               java.lang.reflect.Method method,
                               java.lang.Object key)
        Creates an instance.
        Parameters:
        clazz - he class the get method applies to
        method - the method held by this executor
        key - the property to get
    • Method Detail

      • discover

        public static MapGetExecutor discover​(Introspector is,
                                              java.lang.Class<?> clazz,
                                              java.lang.Object identifier)
        Attempts to discover a MapGetExecutor.
        Parameters:
        is - the introspector
        clazz - the class to find the get method from
        identifier - the key to use as an argument to the get method
        Returns:
        the executor if found, null otherwise
      • getTargetProperty

        public java.lang.Object getTargetProperty()
        Description copied from class: AbstractExecutor
        Gets the property targeted by this executor.
        Overrides:
        getTargetProperty in class AbstractExecutor
        Returns:
        the target property
      • invoke

        public java.lang.Object invoke​(java.lang.Object obj)
        Description copied from interface: JexlPropertyGet
        Method used to get the property value of an object.
        Parameters:
        obj - the object to get the property value from.
        Returns:
        the property value.
      • tryInvoke

        public java.lang.Object tryInvoke​(java.lang.Object obj,
                                          java.lang.Object key)
        Description copied from interface: JexlPropertyGet
        Attempts to reuse this JexlPropertyGet, checking that it is compatible with the actual set of arguments.
        Parameters:
        obj - the object to invoke the property get upon
        key - the property key to get
        Returns:
        the result of the method invocation that should be checked by tryFailed to determine if it succeeded or failed.