com.jgoodies.binding.beans

Class PropertyAccessException


public final class PropertyAccessException
extends PropertyException

A runtime exception that describes read and write access problems when getting/setting a Java Bean property.
Version:
$Revision: 1.6 $
Author:
Karsten Lentzsch
See Also:
PropertyAdapter

Constructor Summary

PropertyAccessException(String message, Throwable cause)
Constructs a new exception instance with the specified detail message and cause.

Method Summary

static PropertyAccessException
createReadAccessException(Object bean, PropertyDescriptor propertyDescriptor, Throwable cause)
Creates and returns a new PropertyAccessException instance for a failed read access for the specified bean, property descriptor and cause.
static PropertyAccessException
createWriteAccessException(Object bean, Object value, PropertyDescriptor propertyDescriptor, Throwable cause)
Creates and returns a new PropertyAccessException instance for a failed write access for the specified bean, value, property descriptor and cause.

Constructor Details

PropertyAccessException

public PropertyAccessException(String message,
                               Throwable cause)
Constructs a new exception instance with the specified detail message and cause.
Parameters:
message - the detail message which is saved for later retrieval by the getMessage() method.
cause - the cause which is saved for later retrieval by the getCause() method. A null value is permitted, and indicates that the cause is nonexistent or unknown.

Method Details

createReadAccessException

public static PropertyAccessException createReadAccessException(Object bean,
                                                                PropertyDescriptor propertyDescriptor,
                                                                Throwable cause)
Creates and returns a new PropertyAccessException instance for a failed read access for the specified bean, property descriptor and cause.
Parameters:
bean - the target bean
propertyDescriptor - describes the bean's property
cause - the cause which is saved for later retrieval by the getCause() method. A null value is permitted, and indicates that the cause is nonexistent or unknown.
Returns:
an exception that describes a read access problem

createWriteAccessException

public static PropertyAccessException createWriteAccessException(Object bean,
                                                                 Object value,
                                                                 PropertyDescriptor propertyDescriptor,
                                                                 Throwable cause)
Creates and returns a new PropertyAccessException instance for a failed write access for the specified bean, value, property descriptor and cause.
Parameters:
bean - the target bean
value - the value that could not be set
propertyDescriptor - describes the bean's property
cause - the cause which is saved for later retrieval by the getCause() method. A null value is permitted, and indicates that the cause is nonexistent or unknown.
Returns:
an exception that describes a write access problem

Copyright © 2002-2008 JGoodies Karsten Lentzsch. All Rights Reserved.