public class PropertyExceptionBuilder extends Object
ArooaPropertyException
.Constructor and Description |
---|
PropertyExceptionBuilder() |
Modifier and Type | Method and Description |
---|---|
PropertyExceptionBuilder |
causedBy(Exception cause)
Add the exception that is the cause.
|
ArooaNoPropertyException |
failedReadingPropertyException(String property)
Provide an
ArooaNoPropertyException for when failing
to read a property. |
ArooaNoPropertyException |
failedWritingPropertyException(String property)
Provide an
ArooaNoPropertyException for when failing
to write a property. |
PropertyExceptionBuilder |
forBean(Object bean)
Add a bean to the exception message.
|
PropertyExceptionBuilder |
forClass(Class<?> theClass)
Add a class to the exception message.
|
protected String |
getBeanAndClassMessageSection()
Helper method to get the bean and class part of the message.
|
ArooaNoPropertyException |
noPropertyException(String property)
Provide an
ArooaNoPropertyException for when there is no
property either readable or writable. |
PropertyExceptionBuilder |
withOverview(BeanOverview overview)
Provide an
BeanOverview of the bean causing the problem. |
public PropertyExceptionBuilder forClass(Class<?> theClass)
theClass
- public PropertyExceptionBuilder forBean(Object bean)
bean
- public PropertyExceptionBuilder withOverview(BeanOverview overview)
BeanOverview
of the bean causing the problem.overview
- public PropertyExceptionBuilder causedBy(Exception cause)
cause
- public ArooaNoPropertyException failedReadingPropertyException(String property)
ArooaNoPropertyException
for when failing
to read a property.property
- public ArooaNoPropertyException failedWritingPropertyException(String property)
ArooaNoPropertyException
for when failing
to write a property.property
- public ArooaNoPropertyException noPropertyException(String property)
ArooaNoPropertyException
for when there is no
property either readable or writable.property
- protected String getBeanAndClassMessageSection()