Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.codehaus.groovy.grails.support
[Java] Class MockApplicationContext

    java.lang.Object
      groovy.lang.GroovyObjectSupport
          org.codehaus.groovy.grails.support.MockApplicationContext

All Implemented Interfaces:
  org.springframework.web.context.WebApplicationContext

    public class MockApplicationContext
    extends groovy.lang.GroovyObjectSupport

Nested Class Summary
`class` | `MockApplicationContext.MockResource`

Method Summary
`boolean` | `containsBean(java.lang.String name)`
`boolean` | `containsBeanDefinition(java.lang.String beanName)`
`boolean` | `containsLocalBean(java.lang.String arg0)`
`A` | `findAnnotationOnBean(java.lang.String name, java.lang.Class annotation)`
`java.lang.String[]` | `getAliases(java.lang.String name)`
`org.springframework.beans.factory.config.AutowireCapableBeanFactory` | `getAutowireCapableBeanFactory()`
`java.lang.Object` | `getBean(java.lang.String name)`
`java.lang.Object` | `getBean(java.lang.String name, java.lang.Class requiredType)`
`java.lang.Object` | `getBean(java.lang.Class tClass)`
`java.lang.Object` | `getBean(java.lang.String name, java.lang.Object... args)`
`int` | `getBeanDefinitionCount()`
`java.lang.String[]` | `getBeanDefinitionNames()`
`java.lang.String[]` | `getBeanNamesForType(java.lang.Class type)`
`java.lang.String[]` | `getBeanNamesForType(java.lang.Class type, boolean includePrototypes, boolean includeFactoryBeans)`
`java.util.Map` | `getBeansOfType(java.lang.Class type)`
`java.util.Map` | `getBeansOfType(java.lang.Class type, boolean includeNonSingletons, boolean allowEagerInit)`
`java.util.Map` | `getBeansWithAnnotation(java.lang.Class annotation)`
`java.lang.ClassLoader` | `getClassLoader()`
`java.lang.String` | `getDisplayName()`
`Environment` | `getEnvironment()`
`java.lang.String` | `getId()`
`java.lang.String` | `getMessage(java.lang.String code, java.lang.Object[] args, java.lang.String defaultMessage, java.util.Locale locale)`
`java.lang.String` | `getMessage(java.lang.String code, java.lang.Object[] args, java.util.Locale locale)`
`java.lang.String` | `getMessage(org.springframework.context.MessageSourceResolvable resolvable, java.util.Locale locale)`
`org.springframework.context.ApplicationContext` | `getParent()`
`org.springframework.beans.factory.BeanFactory` | `getParentBeanFactory()`
`java.lang.Object` | `getProperty(java.lang.String name)`
`Resource` | `getResource(java.lang.String location)`
`Resource[]` | `getResources(java.lang.String locationPattern)`
`javax.servlet.ServletContext` | `getServletContext()`
`long` | `getStartupDate()`
`java.lang.Class` | `getType(java.lang.String name)`
`boolean` | `isPrototype(java.lang.String s)`
`boolean` | `isSingleton(java.lang.String name)`
`boolean` | `isTypeMatch(java.lang.String name, java.lang.Class aClass)`
`void` | `publishEvent(org.springframework.context.ApplicationEvent event)`
`void` | `registerIgnoredClassPathLocation(java.lang.String location)` Registers a resource that should not be found on the classpath.
`void` | `registerMockBean(java.lang.String name, java.lang.Object instance)`
`void` | `registerMockResource(java.lang.String location)` Registers a mock resource.
`void` | `registerMockResource(java.lang.String location, java.lang.String contents)` Registers a mock resource.
`void` | `setServletContext(javax.servlet.ServletContext servletContext)`
`void` | `unregisterIgnoredClassPathLocation(java.lang.String location)` Unregisters a resource that should not be found on the classpath.
`void` | `unregisterMockResource(java.lang.String location)` Unregisters a mock resource.

Methods inherited from class groovy.lang.GroovyObjectSupport
groovy.lang.GroovyObjectSupport#setProperty(java.lang.String, java.lang.Object), groovy.lang.GroovyObjectSupport#getProperty(java.lang.String), groovy.lang.GroovyObjectSupport#getMetaClass(), groovy.lang.GroovyObjectSupport#setMetaClass(groovy.lang.MetaClass), groovy.lang.GroovyObjectSupport#invokeMethod(java.lang.String, java.lang.Object), groovy.lang.GroovyObjectSupport#wait(), groovy.lang.GroovyObjectSupport#wait(long), groovy.lang.GroovyObjectSupport#wait(long, int), groovy.lang.GroovyObjectSupport#equals(java.lang.Object), groovy.lang.GroovyObjectSupport#toString(), groovy.lang.GroovyObjectSupport#hashCode(), groovy.lang.GroovyObjectSupport#getClass(), groovy.lang.GroovyObjectSupport#notify(), groovy.lang.GroovyObjectSupport#notifyAll()

Methods inherited from class java.lang.Object
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()

Method Detail

### containsBean

    public boolean containsBean(java.lang.String name)

### containsBeanDefinition

    public boolean containsBeanDefinition(java.lang.String beanName)

### containsLocalBean

    public boolean containsLocalBean(java.lang.String arg0)

### findAnnotationOnBean

    public A findAnnotationOnBean(java.lang.String name, java.lang.Class annotation)

### getAliases

    public java.lang.String[] getAliases(java.lang.String name)

### getAutowireCapableBeanFactory

    public org.springframework.beans.factory.config.AutowireCapableBeanFactory getAutowireCapableBeanFactory()

### getBean

    public java.lang.Object getBean(java.lang.String name)

### getBean

    public  T getBean(String name, Class requiredType) throws BeansException {
    public java.lang.Object getBean(java.lang.String name, java.lang.Class requiredType)

### getBean

    public java.lang.Object getBean(java.lang.Class tClass)

### getBean

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

### getBeanDefinitionCount

    public int getBeanDefinitionCount()

### getBeanDefinitionNames

    public java.lang.String[] getBeanDefinitionNames()

### getBeanNamesForType

    public String[] getBeanNamesForType(Class type) {
    public java.lang.String[] getBeanNamesForType(java.lang.Class type)

### getBeanNamesForType

    public String[] getBeanNamesForType(Class type, boolean includePrototypes, boolean includeFactoryBeans) {
    public java.lang.String[] getBeanNamesForType(java.lang.Class type, boolean includePrototypes, boolean includeFactoryBeans)

### getBeansOfType

    public  Map getBeansOfType(Class type) throws BeansException {
    public java.util.Map getBeansOfType(java.lang.Class type)

### getBeansOfType

    public java.util.Map getBeansOfType(java.lang.Class type, boolean includeNonSingletons, boolean allowEagerInit)

### getBeansWithAnnotation

    public java.util.Map getBeansWithAnnotation(java.lang.Class annotation)

### getClassLoader

    public java.lang.ClassLoader getClassLoader()

### getDisplayName

    public java.lang.String getDisplayName()

### getEnvironment

    public Environment getEnvironment()

### getId

    public java.lang.String getId()

### getMessage

    public java.lang.String getMessage(java.lang.String code, java.lang.Object[] args, java.lang.String defaultMessage, java.util.Locale locale)

### getMessage

    public java.lang.String getMessage(java.lang.String code, java.lang.Object[] args, java.util.Locale locale)

### getMessage

    public java.lang.String getMessage(org.springframework.context.MessageSourceResolvable resolvable, java.util.Locale locale)

### getParent

    public org.springframework.context.ApplicationContext getParent()

### getParentBeanFactory

    public org.springframework.beans.factory.BeanFactory getParentBeanFactory()

### getProperty

    public Object getProperty(String name) {
    public java.lang.Object getProperty(java.lang.String name)

### getResource

    public Resource getResource(java.lang.String location)

### getResources

    public Resource[] getResources(java.lang.String locationPattern)

### getServletContext

    public javax.servlet.ServletContext getServletContext()

### getStartupDate

    public long getStartupDate()

### getType

    public Class getType(String name) throws NoSuchBeanDefinitionException {
    public java.lang.Class getType(java.lang.String name)

### isPrototype

    public boolean isPrototype(java.lang.String s)

### isSingleton

    public boolean isSingleton(java.lang.String name)

### isTypeMatch

    public boolean isTypeMatch(String name, Class aClass) {
    public boolean isTypeMatch(java.lang.String name, java.lang.Class aClass)

### publishEvent

    public void publishEvent(org.springframework.context.ApplicationEvent event)

### registerIgnoredClassPathLocation

    public void registerIgnoredClassPathLocation(java.lang.String location)

  Registers a resource that should not be found on the classpath. Path separator: "/"
  Parameters:
    `location` - the location of the resource. Example: /WEB-INF/grails-app/i18n/messages.properties

### registerMockBean

    public void registerMockBean(java.lang.String name, java.lang.Object instance)

### registerMockResource

    public void registerMockResource(java.lang.String location)

  Registers a mock resource. Path separator: "/"
  Parameters:
    `location` - the location of the resource. Example: /WEB-INF/grails-app/i18n/messages.properties

### registerMockResource

    public void registerMockResource(java.lang.String location, java.lang.String contents)

  Registers a mock resource. Path separator: "/"
  Parameters:
    `location` - the location of the resource. Example: /WEB-INF/grails-app/i18n/messages.properties

### setServletContext

    public void setServletContext(javax.servlet.ServletContext servletContext)

### unregisterIgnoredClassPathLocation

    public void unregisterIgnoredClassPathLocation(java.lang.String location)

  Unregisters a resource that should not be found on the classpath. Path separator: "/"
  Parameters:
    `location` - the location of the resource. Example: /WEB-INF/grails-app/i18n/messages.properties

### unregisterMockResource

    public void unregisterMockResource(java.lang.String location)

  Unregisters a mock resource. Path separator: "/"
  Parameters:
    `location` - the location of the resource. Example: /WEB-INF/grails-app/i18n/messages.properties

Groovy Documentation