org.springframework.richclient.application
Class PropertyNotSetException

Show UML class diagram
java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.springframework.richclient.application.ApplicationException
                  extended by org.springframework.richclient.application.ConfigurationException
                      extended by org.springframework.richclient.application.PropertyNotSetException
All Implemented Interfaces:
Serializable

public class PropertyNotSetException
extends ConfigurationException

Indicates that the initialization of an object has not set a required property.

Since:
0.3
Author:
Kevin Stembridge
See Also:
Serialized Form

Constructor Summary
PropertyNotSetException(Class beanClass, String propertyName)
          Creates a new PropertyNotSetException with the specified bean class and property name.
 
Method Summary
 Class getBeanClass()
          Returns the class of the JavaBean that has the uninitialized property.
 String getPropertyName()
          Returns the name of the property that has not been set.
static void throwIfNull(Object propertyValue, String propertyName, Class beanClass)
          Throws an instance of this exception if the given propertyValue is null.
 
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
 

Constructor Detail

PropertyNotSetException

public PropertyNotSetException(Class beanClass,
                               String propertyName)
Creates a new PropertyNotSetException with the specified bean class and property name.

Parameters:
beanClass - The class of the JavaBean that has an uninitialized property.
propertyName - The name of the property that has not been set.
Method Detail

throwIfNull

public static void throwIfNull(Object propertyValue,
                               String propertyName,
                               Class beanClass)
Throws an instance of this exception if the given propertyValue is null.

Parameters:
propertyValue - The value of the property.
propertyName - The name of the property.
beanClass - The class on which the property is supposed to be set.
Throws:
PropertyNotSetException - if propertyValue is null.

getBeanClass

public Class getBeanClass()
Returns the class of the JavaBean that has the uninitialized property.

Returns:
Returns the value of the beanClass field.

getPropertyName

public String getPropertyName()
Returns the name of the property that has not been set.

Returns:
Returns the value of the propertyName field.


Copyright © 2004-2009 The Spring Framework. All Rights Reserved.