Class Closure

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String LOCATION  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object eval​(Token t)  
      java.lang.Object execute​(CommandSession x, java.util.List<java.lang.Object> values)
      Execute this function and return the result.
      java.lang.Object executeStatement​(java.util.List<Token> statement)  
      java.lang.Object get​(java.lang.String name)  
      java.lang.Object put​(java.lang.String key, java.lang.Object value)  
      CommandSessionImpl session()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • Closure

        public Closure​(CommandSessionImpl session,
                       Closure parent,
                       java.lang.CharSequence source)
                throws java.lang.Exception
        Throws:
        java.lang.Exception
    • Method Detail

      • execute

        public java.lang.Object execute​(CommandSession x,
                                        java.util.List<java.lang.Object> values)
                                 throws java.lang.Exception
        Description copied from interface: Function
        Execute this function and return the result.
        Specified by:
        execute in interface Function
        Returns:
        the result from the execution.
        Throws:
        java.lang.Exception - if anything goes terribly wrong
      • eval

        public java.lang.Object eval​(Token t)
                              throws java.lang.Exception
        Specified by:
        eval in interface Evaluate
        Throws:
        java.lang.Exception
      • executeStatement

        public java.lang.Object executeStatement​(java.util.List<Token> statement)
                                          throws java.lang.Exception
        Throws:
        java.lang.Exception
      • get

        public java.lang.Object get​(java.lang.String name)
        Specified by:
        get in interface Evaluate
      • put

        public java.lang.Object put​(java.lang.String key,
                                    java.lang.Object value)
        Specified by:
        put in interface Evaluate
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object