Class UberspectImpl

    • Field Detail

      • log

        protected Log log
        Our runtime logger.
      • introspector

        protected Introspector introspector
        the default Velocity introspector
    • Constructor Detail

      • UberspectImpl

        public UberspectImpl()
    • Method Detail

      • init

        public void init()
        init - generates the Introspector. As the setup code makes sure that the log gets set before this is called, we can initialize the Introspector using the log object.
        Specified by:
        init in interface Uberspect
      • setLog

        public void setLog​(Log log)
        Sets the runtime logger - this must be called before anything else.
        Specified by:
        setLog in interface UberspectLoggable
        Parameters:
        log - The logger instance to use.
        Since:
        1.5
      • getIterator

        public java.util.Iterator getIterator​(java.lang.Object obj,
                                              Info i)
                                       throws java.lang.Exception
        To support iterative objects used in a #foreach() loop.
        Specified by:
        getIterator in interface Uberspect
        Parameters:
        obj - The iterative object.
        i - Info about the object's location.
        Returns:
        An Iterator object.
        Throws:
        java.lang.Exception
      • getMethod

        public VelMethod getMethod​(java.lang.Object obj,
                                   java.lang.String methodName,
                                   java.lang.Object[] args,
                                   Info i)
                            throws java.lang.Exception
        Method
        Specified by:
        getMethod in interface Uberspect
        Parameters:
        obj -
        methodName -
        args -
        i -
        Returns:
        A Velocity Method.
        Throws:
        java.lang.Exception
      • getPropertyGet

        public VelPropertyGet getPropertyGet​(java.lang.Object obj,
                                             java.lang.String identifier,
                                             Info i)
                                      throws java.lang.Exception
        Property getter
        Specified by:
        getPropertyGet in interface Uberspect
        Parameters:
        obj -
        identifier -
        i -
        Returns:
        A Velocity Getter Method.
        Throws:
        java.lang.Exception
      • getPropertySet

        public VelPropertySet getPropertySet​(java.lang.Object obj,
                                             java.lang.String identifier,
                                             java.lang.Object arg,
                                             Info i)
                                      throws java.lang.Exception
        Property setter
        Specified by:
        getPropertySet in interface Uberspect
        Parameters:
        obj -
        identifier -
        arg -
        i -
        Returns:
        A Velocity Setter method.
        Throws:
        java.lang.Exception