@SuppressWarnings("unchecked") public class MockApplicationContext extends GroovyObjectSupport implements WebApplicationContext
Modifiers | Name | Description |
---|---|---|
class |
MockApplicationContext.MockResource |
Type Params | Return Type | Name and description |
---|---|---|
|
public boolean |
containsBean(String name) |
|
public boolean |
containsBeanDefinition(String beanName) |
|
public boolean |
containsLocalBean(String arg0) |
<A extends Annotation> |
public Set<A> |
findAllAnnotationsOnBean(String beanName, Class<A> annotationType, boolean allowFactoryBeanInit) |
<A extends Annotation> |
public A |
findAnnotationOnBean(String name, Class<A> annotation) |
<A extends Annotation> |
public A |
findAnnotationOnBean(String beanName, Class<A> annotationType, boolean allowFactoryBeanInit) |
|
public String[] |
getAliases(String name) |
|
public String |
getApplicationName() |
|
public AutowireCapableBeanFactory |
getAutowireCapableBeanFactory() |
|
public Object |
getBean(String name) |
<T> |
public T |
getBean(String name, Class<T> requiredType) |
<T> |
public T |
getBean(Class<T> tClass) |
|
public Object |
getBean(String name, Object args) |
<T> |
public T |
getBean(Class<T> requiredType, Object args) |
|
public int |
getBeanDefinitionCount() |
|
public String[] |
getBeanDefinitionNames() |
|
public String[] |
getBeanNamesForAnnotation(Class<? extends Annotation> annotationType) Find all names of beans whose Class has the supplied Annotation
type, without creating any bean instances yet. |
|
public String[] |
getBeanNamesForType(ResolvableType type) |
|
public String[] |
getBeanNamesForType(ResolvableType type, boolean includeNonSingletons, boolean allowEagerInit) |
|
public String[] |
getBeanNamesForType(Class type) |
|
public String[] |
getBeanNamesForType(Class type, boolean includePrototypes, boolean includeFactoryBeans) |
<T> |
public ObjectProvider<T> |
getBeanProvider(Class<T> requiredType, boolean allowEagerInit) |
<T> |
public ObjectProvider<T> |
getBeanProvider(ResolvableType requiredType, boolean allowEagerInit) |
<T> |
public ObjectProvider<T> |
getBeanProvider(Class<T> requiredType) |
<T> |
public ObjectProvider<T> |
getBeanProvider(ResolvableType requiredType) |
<T> |
public Map<String, T> |
getBeansOfType(Class<T> type) |
<T> |
public Map<String, T> |
getBeansOfType(Class<T> type, boolean includeNonSingletons, boolean allowEagerInit) |
|
public Map<String, Object> |
getBeansWithAnnotation(Class<? extends Annotation> annotation) |
|
public ClassLoader |
getClassLoader() |
|
public String |
getDisplayName() |
|
public Environment |
getEnvironment() |
|
public String |
getId() |
|
public T |
getIfAvailable() |
|
public T |
getIfAvailable() |
|
public T |
getIfUnique() |
|
public T |
getIfUnique() |
|
public String |
getMessage(String code, Object[] args, String defaultMessage, Locale locale) |
|
public String |
getMessage(String code, Object[] args, Locale locale) |
|
public String |
getMessage(MessageSourceResolvable resolvable, Locale locale) |
|
public T |
getObject(Object args) |
|
public T |
getObject() |
|
public T |
getObject(Object args) |
|
public T |
getObject() |
|
public ApplicationContext |
getParent() |
|
public BeanFactory |
getParentBeanFactory() |
|
public Object |
getProperty(String name) |
|
public Resource |
getResource(String location) |
|
public Resource[] |
getResources(String locationPattern) |
|
public ServletContext |
getServletContext() |
|
public long |
getStartupDate() |
|
public Class |
getType(String name) |
|
public Class<?> |
getType(String name, boolean allowFactoryBeanInit) |
|
public boolean |
isPrototype(String s) |
|
public boolean |
isSingleton(String name) |
|
public boolean |
isTypeMatch(String name, ResolvableType typeToMatch) |
|
public boolean |
isTypeMatch(String name, Class aClass) |
|
public void |
publishEvent(ApplicationEvent event) |
|
public void |
publishEvent(Object event) |
|
public void |
registerIgnoredClassPathLocation(String location) Registers a resource that should not be found on the classpath. |
|
public void |
registerMockBean(String name, Object instance) |
|
public void |
registerMockResource(String location) Registers a mock resource. |
|
public void |
registerMockResource(String location, String contents) Registers a mock resource. |
|
public void |
setServletContext(ServletContext servletContext) |
|
public void |
unregisterIgnoredClassPathLocation(String location) Unregisters a resource that should not be found on the classpath. |
|
public void |
unregisterMockResource(String location) Unregisters a mock resource. |
Methods inherited from class | Name |
---|---|
class GroovyObjectSupport |
equals, getClass, getMetaClass, getProperty, hashCode, invokeMethod, notify, notifyAll, setMetaClass, setProperty, toString, wait, wait, wait |
Find all names of beans whose Class
has the supplied Annotation
type, without creating any bean instances yet.
annotationType
- the type of annotation to look forRegisters a resource that should not be found on the classpath. Path separator: "/"
location
- the location of the resource. Example: /WEB-INF/grails-app/i18n/messages.propertiesRegisters a mock resource. Path separator: "/"
location
- the location of the resource. Example: /WEB-INF/grails-app/i18n/messages.propertiesRegisters a mock resource. Path separator: "/"
location
- the location of the resource. Example: /WEB-INF/grails-app/i18n/messages.propertiesUnregisters a resource that should not be found on the classpath. Path separator: "/"
location
- the location of the resource. Example: /WEB-INF/grails-app/i18n/messages.propertiesUnregisters a mock resource. Path separator: "/"
location
- the location of the resource. Example: /WEB-INF/grails-app/i18n/messages.properties