Groovy Documentation

## org.codehaus.groovy.grails.commons.spring
[Java] Class GrailsApplicationContext

    java.lang.Object
      org.springframework.context.support.GenericApplicationContext
          org.codehaus.groovy.grails.commons.spring.GrailsApplicationContext

All Implemented Interfaces:
  groovy.lang.GroovyObject

    public class GrailsApplicationContext
    extends GenericApplicationContext

An ApplicationContext that extends StaticApplicationContext and implements GroovyObject such that beans can be retrieved with the dot de-reference syntax instead of using getBean('name').

Authors:
  Graeme Rocher

Since:
  1.0

Field Summary
`protected groovy.lang.MetaClass` | `metaClass`

Constructor Summary
`GrailsApplicationContext(DefaultListableBeanFactory defaultListableBeanFactory)`
`GrailsApplicationContext(DefaultListableBeanFactory defaultListableBeanFactory, ApplicationContext applicationContext)`
`GrailsApplicationContext(java.lang.Object parent)`
`GrailsApplicationContext()`

Method Summary
`groovy.lang.MetaClass` | `getMetaClass()`
`java.lang.Object` | `getProperty(java.lang.String property)`
`Theme` | `getTheme(java.lang.String themeName)`
`java.lang.Object` | `invokeMethod(java.lang.String name, java.lang.Object args)`
`protected void` | `onRefresh()` Initialize the theme capability.
`void` | `registerPrototype(java.lang.String name, java.lang.Class clazz)` Register a prototype bean with the underlying bean factory.
`void` | `registerPrototype(java.lang.String name, java.lang.Class clazz, MutablePropertyValues pvs)` Register a prototype bean with the underlying bean factory.
`void` | `registerSingleton(java.lang.String name, java.lang.Class clazz)` Register a singleton bean with the underlying bean factory.
`void` | `registerSingleton(java.lang.String name, java.lang.Class clazz, MutablePropertyValues pvs)` Register a singleton bean with the underlying bean factory.
`void` | `setMetaClass(groovy.lang.MetaClass metaClass)`
`void` | `setProperty(java.lang.String property, java.lang.Object newValue)`

Field Detail

### metaClass

    protected groovy.lang.MetaClass metaClass

Constructor Detail

### GrailsApplicationContext

    public GrailsApplicationContext(DefaultListableBeanFactory defaultListableBeanFactory)

### GrailsApplicationContext

    public GrailsApplicationContext(DefaultListableBeanFactory defaultListableBeanFactory, ApplicationContext applicationContext)

### GrailsApplicationContext

    public GrailsApplicationContext(java.lang.Object parent)

### GrailsApplicationContext

    public GrailsApplicationContext()

Method Detail

### getMetaClass

    public groovy.lang.MetaClass getMetaClass()

### getProperty

    public java.lang.Object getProperty(java.lang.String property)

### getTheme

    public Theme getTheme(java.lang.String themeName)

### invokeMethod

    public java.lang.Object invokeMethod(java.lang.String name, java.lang.Object args)

### onRefresh

    @Override
    protected void onRefresh()

  Initialize the theme capability.

### registerPrototype

    public void registerPrototype(java.lang.String name, java.lang.Class clazz)

  Register a prototype bean with the underlying bean factory.

  For more advanced needs, register with the underlying BeanFactory directly.

  See Also:
    getDefaultListableBeanFactory

### registerPrototype

    public void registerPrototype(java.lang.String name, java.lang.Class clazz, MutablePropertyValues pvs)

  Register a prototype bean with the underlying bean factory.

  For more advanced needs, register with the underlying BeanFactory directly.

  See Also:
    getDefaultListableBeanFactory

### registerSingleton

    public void registerSingleton(java.lang.String name, java.lang.Class clazz)

  Register a singleton bean with the underlying bean factory.

  For more advanced needs, register with the underlying BeanFactory directly.

  See Also:
    getDefaultListableBeanFactory

### registerSingleton

    public void registerSingleton(java.lang.String name, java.lang.Class clazz, MutablePropertyValues pvs)

  Register a singleton bean with the underlying bean factory.

  For more advanced needs, register with the underlying BeanFactory directly.

  See Also:
    getDefaultListableBeanFactory

### setMetaClass

    public void setMetaClass(groovy.lang.MetaClass metaClass)

### setProperty

    public void setProperty(java.lang.String property, java.lang.Object newValue)

Groovy Documentation