org.springframework.beans.factory
Class NoSuchBeanDefinitionException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byjava.lang.RuntimeException
              extended byorg.springframework.core.NestedRuntimeException
                  extended byorg.springframework.beans.BeansException
                      extended byorg.springframework.beans.factory.NoSuchBeanDefinitionException
All Implemented Interfaces:
java.io.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.

Version:
$Id: NoSuchBeanDefinitionException.java,v 1.5 2004/03/18 10:37:40 jhoeller Exp $
Author:
Rod Johnson
See Also:
Serialized Form

Constructor Summary
NoSuchBeanDefinitionException(java.lang.Class type, java.lang.String message)
          Create new NoSuchBeanDefinitionException.
NoSuchBeanDefinitionException(java.lang.String name, java.lang.String message)
          Create new NoSuchBeanDefinitionException.
 
Method Summary
 java.lang.String getBeanName()
          Return the name of the missing bean, if it was a lookup by name that failed.
 java.lang.Class getBeanType()
          Return the required type of bean, if it was a lookup by type that failed.
 
Methods inherited from class org.springframework.core.NestedRuntimeException
getCause, getMessage, printStackTrace, printStackTrace
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getStackTrace, initCause, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NoSuchBeanDefinitionException

public NoSuchBeanDefinitionException(java.lang.String name,
                                     java.lang.String message)
Create new NoSuchBeanDefinitionException.

Parameters:
name - the name of the missing bean
message - further, detailed message describing the problem

NoSuchBeanDefinitionException

public NoSuchBeanDefinitionException(java.lang.Class type,
                                     java.lang.String message)
Create new NoSuchBeanDefinitionException.

Parameters:
type - required type of bean
message - further, detailed message describing the problem
Method Detail

getBeanName

public java.lang.String getBeanName()
Return the name of the missing bean, if it was a lookup by name that failed.


getBeanType

public java.lang.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.