Interface Uberspect

  • All Known Implementing Classes:
    SandboxUberspectImpl, UberspectImpl

    public interface Uberspect
    'Federated' introspection/reflection interface to allow the introspection behavior in JEXL to be customized.
    Since:
    1.0
    • Method Detail

      • setClassLoader

        void setClassLoader​(java.lang.ClassLoader loader)
        Sets the class loader to use when getting a constructor with a class name parameter.
        Parameters:
        loader - the class loader
      • getConstructor

        @Deprecated
        java.lang.reflect.Constructor<?> getConstructor​(java.lang.Object ctorHandle,
                                                        java.lang.Object[] args,
                                                        JexlInfo info)
        Deprecated.
        Returns a class constructor.
        Parameters:
        ctorHandle - a class or class name
        args - constructor arguments
        info - contextual information
        Returns:
        a Constructor
      • getConstructorMethod

        JexlMethod getConstructorMethod​(java.lang.Object ctorHandle,
                                        java.lang.Object[] args,
                                        JexlInfo info)
        Returns a class constructor wrapped in a JexlMethod.
        Parameters:
        ctorHandle - a class or class name
        args - constructor arguments
        info - contextual information
        Returns:
        a Constructor
        Since:
        2.1
      • getMethod

        JexlMethod getMethod​(java.lang.Object obj,
                             java.lang.String method,
                             java.lang.Object[] args,
                             JexlInfo info)
        Returns a JexlMethod.
        Parameters:
        obj - the object
        method - the method name
        args - method arguments
        info - contextual information
        Returns:
        a JexlMethod
      • getPropertyGet

        JexlPropertyGet getPropertyGet​(java.lang.Object obj,
                                       java.lang.Object identifier,
                                       JexlInfo info)
        Property getter.

        Returns JexlPropertyGet appropos for ${bar.woogie}.

        Parameters:
        obj - the object to get the property from
        identifier - property name
        info - contextual information
        Returns:
        a JexlPropertyGet
      • getPropertySet

        JexlPropertySet getPropertySet​(java.lang.Object obj,
                                       java.lang.Object identifier,
                                       java.lang.Object arg,
                                       JexlInfo info)
        Property setter.

        returns JelPropertySet appropos for ${foo.bar = "geir"}

        .
        Parameters:
        obj - the object to get the property from.
        identifier - property name
        arg - value to set
        info - contextual information
        Returns:
        a JexlPropertySet.
      • getIterator

        java.util.Iterator<?> getIterator​(java.lang.Object obj,
                                          JexlInfo info)
        Gets an iterator from an object.
        Parameters:
        obj - to get the iterator for
        info - contextual information
        Returns:
        an iterator over obj