Class BeanRuntimeException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.apache.juneau.commons.reflect.BeanRuntimeException
- All Implemented Interfaces:
Serializable
A
RuntimeException wrapper around common reflection exceptions.
This exception is used to wrap checked exceptions that commonly occur when using Java reflection APIs, converting them into unchecked exceptions for easier handling in bean-processing code.
Wrapped Exceptions:
InstantiationExceptionIllegalAccessExceptionIllegalArgumentExceptionInvocationTargetExceptionNoSuchMethodExceptionSecurityException
The exception message can optionally include the class name of the bean that caused the exception, making it easier to identify the source of reflection errors in complex bean hierarchies.
Example:
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionBeanRuntimeException(Class<?> c, String message, Object... args) Constructor.BeanRuntimeException(String message) Constructor.BeanRuntimeException(String message, Object... args) Constructor.BeanRuntimeException(Throwable cause) Constructor.BeanRuntimeException(Throwable cause, Class<?> c, String message, Object... args) Constructor. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
BeanRuntimeException
Constructor.- Parameters:
c- The class name of the bean that caused the exception.message- The error message.args- Arguments passed in to theString.format()method.
-
BeanRuntimeException
Constructor.- Parameters:
message- The error message.
-
BeanRuntimeException
Constructor.- Parameters:
message- The error message.args- Arguments passed in to theString.format()method.
-
BeanRuntimeException
Constructor.- Parameters:
cause- The initial cause of the exception.
-
BeanRuntimeException
Constructor.- Parameters:
cause- The cause of this exception.c- The class name of the bean that caused the exception.message- TheMessageFormat-style message.args- OptionalMessageFormat-style arguments.
-