org.springframework.beans.factory
Class NoSuchBeanDefinitionException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.springframework.core.NestedRuntimeException
org.springframework.beans.BeansException
org.springframework.beans.factory.NoSuchBeanDefinitionException
- All Implemented Interfaces:
- Serializable
- public class NoSuchBeanDefinitionException
- extends BeansException
Exception thrown when a BeanFactory is asked for a bean
instance name for which it cannot find a definition.
- Author:
- Rod Johnson
- See Also:
- Serialized Form
Method Summary |
String |
getBeanName()
Return the name of the missing bean,
if it was a lookup by name that failed. |
Class |
getBeanType()
Return the required type of bean,
if it was a lookup by type that failed. |
NoSuchBeanDefinitionException
public NoSuchBeanDefinitionException(String name,
String message)
- Create new
NoSuchBeanDefinitionException
.
- Parameters:
name
- the name of the missing beanmessage
- further, detailed message describing the problem
NoSuchBeanDefinitionException
public NoSuchBeanDefinitionException(Class type,
String message)
- Create new
NoSuchBeanDefinitionException
.
- Parameters:
type
- required type of beanmessage
- further, detailed message describing the problem
getBeanName
public String getBeanName()
- Return the name of the missing bean,
if it was a lookup by name that failed.
getBeanType
public Class getBeanType()
- Return the required type of bean,
if it was a lookup by type that failed.
Copyright (C) 2003-2004 The Spring Framework Project.