org.springframework.beans
Class PropertyAccessExceptionsException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.springframework.core.NestedRuntimeException
                  extended by org.springframework.beans.BeansException
                      extended by org.springframework.beans.PropertyAccessExceptionsException
All Implemented Interfaces:
Serializable

public class PropertyAccessExceptionsException
extends BeansException

Combined exception, composed of individual binding propertyAccessExceptions. An object of this class is created at the beginning of the binding process, and errors added to it as necessary.

The binding process continues when it encounters application-level propertyAccessExceptions, applying those changes that can be applied and storing rejected changes in an object of this class.

Since:
18 April 2001
Author:
Rod Johnson, Juergen Hoeller
See Also:
Serialized Form

Constructor Summary
PropertyAccessExceptionsException(BeanWrapper beanWrapper, PropertyAccessException[] propertyAccessExceptions)
          Create a new PropertyAccessExceptionsException.
 
Method Summary
 BeanWrapper getBeanWrapper()
          Return the BeanWrapper that generated this exception.
 Object getBindObject()
          Return the object we're binding to.
 int getExceptionCount()
          If this returns 0, no errors were encountered during binding.
 String getMessage()
          Return the detail message, including the message from the nested exception if there is one.
 PropertyAccessException getPropertyAccessException(String propertyName)
          Return the exception for this field, or null if there isn't one.
 PropertyAccessException[] getPropertyAccessExceptions()
          Return an array of the propertyAccessExceptions stored in this object.
 void printStackTrace(PrintStream ps)
          Print the composite message and the embedded stack trace to the specified stream.
 void printStackTrace(PrintWriter pw)
          Print the composite message and the embedded stack trace to the specified writer.
 String toString()
           
 
Methods inherited from class org.springframework.core.NestedRuntimeException
contains, getCause
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getStackTrace, initCause, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PropertyAccessExceptionsException

public PropertyAccessExceptionsException(BeanWrapper beanWrapper,
                                         PropertyAccessException[] propertyAccessExceptions)
Create a new PropertyAccessExceptionsException.

Parameters:
beanWrapper - the BeanWrapper that wraps the target object
propertyAccessExceptions - the List of PropertyAccessExceptions
Method Detail

getBeanWrapper

public BeanWrapper getBeanWrapper()
Return the BeanWrapper that generated this exception.


getBindObject

public Object getBindObject()
Return the object we're binding to.


getExceptionCount

public int getExceptionCount()
If this returns 0, no errors were encountered during binding.


getPropertyAccessExceptions

public PropertyAccessException[] getPropertyAccessExceptions()
Return an array of the propertyAccessExceptions stored in this object. Will return the empty array (not null) if there were no errors.


getPropertyAccessException

public PropertyAccessException getPropertyAccessException(String propertyName)
Return the exception for this field, or null if there isn't one.


getMessage

public String getMessage()
Description copied from class: NestedRuntimeException
Return the detail message, including the message from the nested exception if there is one.

Overrides:
getMessage in class NestedRuntimeException

printStackTrace

public void printStackTrace(PrintStream ps)
Description copied from class: NestedRuntimeException
Print the composite message and the embedded stack trace to the specified stream.

Overrides:
printStackTrace in class NestedRuntimeException
Parameters:
ps - the print stream

printStackTrace

public void printStackTrace(PrintWriter pw)
Description copied from class: NestedRuntimeException
Print the composite message and the embedded stack trace to the specified writer.

Overrides:
printStackTrace in class NestedRuntimeException
Parameters:
pw - the print writer

toString

public String toString()
Overrides:
toString in class Throwable


Copyright (c) 2002-2006 The Spring Framework Project.