Class SpringAwareGroovyServlet.SpringAwareBinding

  • All Implemented Interfaces:
    groovy.lang.GroovyObject
    Enclosing class:
    SpringAwareGroovyServlet

    protected static class SpringAwareGroovyServlet.SpringAwareBinding
    extends groovy.lang.Binding
    Groovy Binding which is delegating to a existing one but looks up missing variables inside the provided ApplicationContext. Do note that beans are stored inside the binding and therefore only looked up once!
    • Constructor Summary

      Constructors 
      Constructor Description
      SpringAwareBinding​(groovy.lang.Binding delegate, org.springframework.context.ApplicationContext springCtx)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object getProperty​(java.lang.String property)  
      java.lang.Object getVariable​(java.lang.String name)  
      java.util.Map getVariables()  
      boolean hasVariable​(java.lang.String name)  
      void setProperty​(java.lang.String property, java.lang.Object newValue)  
      void setVariable​(java.lang.String name, java.lang.Object value)  
      • Methods inherited from class groovy.lang.GroovyObjectSupport

        getMetaClass, invokeMethod, setMetaClass
      • Methods inherited from class java.lang.Object

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

      • SpringAwareBinding

        public SpringAwareBinding​(groovy.lang.Binding delegate,
                                  org.springframework.context.ApplicationContext springCtx)
    • Method Detail

      • getVariable

        public java.lang.Object getVariable​(java.lang.String name)
        Overrides:
        getVariable in class groovy.lang.Binding
      • setVariable

        public void setVariable​(java.lang.String name,
                                java.lang.Object value)
        Overrides:
        setVariable in class groovy.lang.Binding
      • hasVariable

        public boolean hasVariable​(java.lang.String name)
        Overrides:
        hasVariable in class groovy.lang.Binding
      • getVariables

        public java.util.Map getVariables()
        Overrides:
        getVariables in class groovy.lang.Binding
      • getProperty

        public java.lang.Object getProperty​(java.lang.String property)
        Specified by:
        getProperty in interface groovy.lang.GroovyObject
        Overrides:
        getProperty in class groovy.lang.Binding
      • setProperty

        public void setProperty​(java.lang.String property,
                                java.lang.Object newValue)
        Specified by:
        setProperty in interface groovy.lang.GroovyObject
        Overrides:
        setProperty in class groovy.lang.Binding