org.milyn.javabean.dynamic
Class BeanRegistrationException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.milyn.SmooksException
                  extended by org.milyn.javabean.dynamic.BeanRegistrationException
All Implemented Interfaces:
Serializable

public class BeanRegistrationException
extends org.milyn.SmooksException

Bean Registration Exception.

See factory methods..

Author:
tom.fennelly@gmail.com
See Also:
Serialized Form

Method Summary
static void throwBeanInstanceAlreadyRegisteredException(Object bean)
          Throw a BeanRegistrationException exception for the specified bean instance that is already registered.
static void throwBeanNotAnnotatedWithDefaultNamespace(Object bean)
          Throw a BeanRegistrationException exception for a bean that is not annotated with the DefaultNamespace annotation.
static void throwUnregisteredBeanInstanceException(Object bean)
          Throw a BeanRegistrationException exception for the specified "unregistered" bean instance.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

throwUnregisteredBeanInstanceException

public static void throwUnregisteredBeanInstanceException(Object bean)
                                                   throws BeanRegistrationException
Throw a BeanRegistrationException exception for the specified "unregistered" bean instance.

This exception is thrown when one of the root bean instances for a namespace used within a model doesn't have registered BeanMetadata (via the Model.registerBean(Object)).

Parameters:
bean - The unknown bean instance.
Throws:
BeanRegistrationException - The exception.

throwBeanInstanceAlreadyRegisteredException

public static void throwBeanInstanceAlreadyRegisteredException(Object bean)
                                                        throws BeanRegistrationException
Throw a BeanRegistrationException exception for the specified bean instance that is already registered.

Parameters:
bean - The bean instance.
Throws:
BeanRegistrationException - The exception.

throwBeanNotAnnotatedWithDefaultNamespace

public static void throwBeanNotAnnotatedWithDefaultNamespace(Object bean)
                                                      throws BeanRegistrationException
Throw a BeanRegistrationException exception for a bean that is not annotated with the DefaultNamespace annotation.

All namespace root bean types must be annotated with the DefaultNamespace annotation.

Parameters:
bean - The bean instance.
Throws:
BeanRegistrationException - The exception.


Copyright © 2018. All rights reserved.