|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Throwable java.lang.Exception com.taursys.util.ChainedException com.taursys.model.ModelException com.taursys.model.ModelPropertyAccessorException
ModelExceptions encountered while accessing properties. This exception stores information about the reason and various other meaningful data whenever an Exception occurs in a PropertyAccessor.
Field Summary | |
protected static java.lang.String[] |
friendlyMessages
|
protected java.lang.String |
givenValueDataType
|
protected java.lang.String |
givenValueObjectClassName
|
protected static java.lang.String[] |
messages
|
protected java.lang.String |
methodName
|
protected java.lang.String |
propertyDataType
|
protected java.lang.String |
propertyName
|
static int |
REASON_ILLEGAL_ACCESS_EXCEPTION
|
static int |
REASON_ILLEGAL_ARGUMENT_EXCEPTION
|
static int |
REASON_INTROSPECTION_EXCEPTION
|
static int |
REASON_NO_READ_METHOD_FOR_PROPERTY
|
static int |
REASON_NO_WRITE_METHOD_FOR_PROPERTY
|
static int |
REASON_NULL_VALUE_FOR_PRIMATIVE
|
static int |
REASON_OFFSET
|
static int |
REASON_PROPERTY_NAME_MISSING
|
static int |
REASON_PROPERTY_NOT_FOUND
|
static int |
REASON_TARGET_AND_CLASS_ARE_NULL
|
static int |
REASON_TARGET_CLASS_IS_NULL
|
static int |
REASON_TARGET_IS_NULL
|
protected java.lang.String |
valueObjectClassName
|
Fields inherited from class com.taursys.model.ModelException |
REASON_INTERNAL_ERROR, REASON_MODEL_IS_WRONG_CLASS, REASON_MULTI_PROPERTY_MISMATCH, REASON_OBJECTS_ARE_IMMUTABLE, REASON_PARSE_CONVERSION_ERROR |
Fields inherited from class com.taursys.util.ChainedException |
cause, diagnosticInfo, reason, REASON_INVALID_REASON_CODE, REASON_UNSPECIFIED, userFriendlyMessage |
Constructor Summary | |
|
ModelPropertyAccessorException(int reason,
java.lang.Class voClass,
java.lang.String propertyName)
Constructs exception for given reason, VO class and propertyName. |
|
ModelPropertyAccessorException(int reason,
java.lang.Class voClass,
java.lang.String propertyName,
int javaDataType,
java.lang.Object target,
java.lang.reflect.Method method)
Constructs exception for given reason, VO class, propertyName, data type, target object, and invoked method. |
|
ModelPropertyAccessorException(int reason,
java.lang.Class voClass,
java.lang.String propertyName,
int javaDataType,
java.lang.Object target,
java.lang.reflect.Method method,
java.lang.Throwable cause)
Constructs exception for given reason, VO class, propertyName, data type, target object, invoked method and cause. |
|
ModelPropertyAccessorException(int reason,
java.lang.Class voClass,
java.lang.String propertyName,
int javaDataType,
java.lang.Object target,
java.lang.Object value,
java.lang.reflect.Method method,
java.lang.Throwable cause)
Constructs exception for given reason, VO class, propertyName, data type, invoked method and cause. |
protected |
ModelPropertyAccessorException(java.lang.String message,
int reason)
Creates a ChainedException with a message. |
Method Summary | |
java.lang.String |
getGivenValueDataType()
Returns the class name of the given value |
java.lang.String |
getGivenValueObjectClassName()
Returns the class name of the given value object for the operation |
java.lang.String |
getMethodName()
Returns method name involved in exception |
java.lang.String |
getPropertyDataType()
Returns the data type of the property |
java.lang.String |
getPropertyName()
Returns property name involved in exception |
static java.lang.String |
getReasonMessage(int reason)
Returns String for given reason code else String for REASON_INVALID_REASON_CODE. |
java.lang.String |
getValueObjectClassName()
Returns class name involved in exception |
protected void |
setDiagnosticsInfo()
Builds the diagnosticsInfo String from the current property values. |
protected void |
setGivenValueDataType(java.lang.Object value)
Sets the class name of the given value else "null" if null. |
protected void |
setGivenValueObjectClassName(java.lang.Object given)
Sets the class name for the given object else "null" if null. |
protected void |
setMethodName(java.lang.reflect.Method method)
Sets the method name for the given method. |
protected void |
setPropertyDataType(int javaDataType)
Sets the property data type for the given type code |
protected void |
setValueObjectClassName(java.lang.Class voClass)
Sets the valueObject class name for the given class else "null" if null. |
Methods inherited from class com.taursys.util.ChainedException |
getCause, getDiagnosticInfo, getInvalidMessage, getLocalizedMessage, getReason, getUserFriendlyMessage, main, printStackTrace, printStackTrace, printStackTrace |
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getMessage, getStackTrace, initCause, setStackTrace, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int REASON_OFFSET
public static final int REASON_TARGET_CLASS_IS_NULL
public static final int REASON_PROPERTY_NAME_MISSING
public static final int REASON_PROPERTY_NOT_FOUND
public static final int REASON_NO_READ_METHOD_FOR_PROPERTY
public static final int REASON_NO_WRITE_METHOD_FOR_PROPERTY
public static final int REASON_INTROSPECTION_EXCEPTION
public static final int REASON_ILLEGAL_ACCESS_EXCEPTION
public static final int REASON_TARGET_IS_NULL
public static final int REASON_ILLEGAL_ARGUMENT_EXCEPTION
public static final int REASON_TARGET_AND_CLASS_ARE_NULL
public static final int REASON_NULL_VALUE_FOR_PRIMATIVE
protected static final java.lang.String[] messages
protected static final java.lang.String[] friendlyMessages
protected java.lang.String propertyName
protected java.lang.String valueObjectClassName
protected java.lang.String methodName
protected java.lang.String givenValueObjectClassName
protected java.lang.String propertyDataType
protected java.lang.String givenValueDataType
Constructor Detail |
public ModelPropertyAccessorException(int reason, java.lang.Class voClass, java.lang.String propertyName)
public ModelPropertyAccessorException(int reason, java.lang.Class voClass, java.lang.String propertyName, int javaDataType, java.lang.Object target, java.lang.Object value, java.lang.reflect.Method method, java.lang.Throwable cause)
public ModelPropertyAccessorException(int reason, java.lang.Class voClass, java.lang.String propertyName, int javaDataType, java.lang.Object target, java.lang.reflect.Method method)
public ModelPropertyAccessorException(int reason, java.lang.Class voClass, java.lang.String propertyName, int javaDataType, java.lang.Object target, java.lang.reflect.Method method, java.lang.Throwable cause)
protected ModelPropertyAccessorException(java.lang.String message, int reason)
Method Detail |
public static java.lang.String getReasonMessage(int reason)
protected void setDiagnosticsInfo()
protected void setPropertyDataType(int javaDataType)
public java.lang.String getPropertyDataType()
public java.lang.String getPropertyName()
protected void setValueObjectClassName(java.lang.Class voClass)
public java.lang.String getValueObjectClassName()
protected void setMethodName(java.lang.reflect.Method method)
public java.lang.String getMethodName()
protected void setGivenValueObjectClassName(java.lang.Object given)
public java.lang.String getGivenValueObjectClassName()
protected void setGivenValueDataType(java.lang.Object value)
public java.lang.String getGivenValueDataType()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |