jef.dna.infoStructures.exceptions
Class FieldInfoValidationException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by jef.dna.exceptions.ValidationExceptionAncestor
              extended by jef.dna.infoStructures.exceptions.FieldInfoValidationException
All Implemented Interfaces:
java.io.Serializable

public class FieldInfoValidationException
extends ValidationExceptionAncestor

This exception is thrown whenever a validation process over a ConstantInfo fails. Should the getAttribute() method return Attribute, the getActualValue() method will return the index of the Attribute entry of the current FieldInfo whose validation failed. In such a case, the current FieldInfoValidationException will contain either an AttributeValidationException or an AttributeOutOfRangeException.

Author:
Francesco Russo
See Also:
Serialized Form

Field Summary
 
Fields inherited from class jef.dna.exceptions.ValidationExceptionAncestor
actualValue, attribute, expectedValue, innerIore, msg, srcEntity
 
Constructor Summary
FieldInfoValidationException(java.lang.Object srcEntity, java.lang.String attribute, java.lang.Object actualValue, java.lang.Object expectedValue, java.lang.String msg)
          Creates a new instance of FieldInfoValidationException without detail message.
 
Method Summary
 java.lang.Object getExpectedValue()
          Returns the expected value associated with the attribute over which the validation process failed.
 AttributeOutOfRangeException getInnerAttributeOutOfRangeException()
          Gets the AttributeOutOfRangeException that caused the current FieldInfoValidationException to be raised.
 AttributeValidationException getInnerAttributeValidationException()
          Gets the AttributeValidationException that caused the current FieldInfoValidationException to be raised.
 void setInnerAttributeOutOfRangeException(AttributeOutOfRangeException e)
          Sets the AttributeOutOfRangeException that caused the current FieldInfoValidationException to be raised.
 void setInnerAttributeValidationException(AttributeValidationException e)
          Sets the AttributeValidationException that caused the current FieldInfoValidationException to be raised.
 
Methods inherited from class jef.dna.exceptions.ValidationExceptionAncestor
getActualValue, getAttribute, getHelper, getInnerIndexOutOfRangeException, getMessage, getSrcEntity, setInnerIndexOutOfRangeException
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FieldInfoValidationException

public FieldInfoValidationException(java.lang.Object srcEntity,
                                    java.lang.String attribute,
                                    java.lang.Object actualValue,
                                    java.lang.Object expectedValue,
                                    java.lang.String msg)
Creates a new instance of FieldInfoValidationException without detail message.

Parameters:
srcEntity - The source of the exception
attribute - The attribute of the FIELD_info (access-flag, name_index, descriptor_index or attributes_count) over which the validation failed.
actualValue - The actual value of the above attribute. If attribute has value Attributes, actualValue is the index of the attibute whose validation failed within the attributes list of the FieldInfoStructure instance
expectedValue - The expected value of the above attribute, or null if attribute equals Attributes
msg - A descriptive message of what occourred
Method Detail

getExpectedValue

public java.lang.Object getExpectedValue()
Returns the expected value associated with the attribute over which the validation process failed. WARNING: this value might be null should not be possible to infer an expected correct value.

Returns:
Object The actual value

setInnerAttributeValidationException

public void setInnerAttributeValidationException(AttributeValidationException e)
Sets the AttributeValidationException that caused the current FieldInfoValidationException to be raised.

Parameters:
e - The inner exceptio of the current exception

getInnerAttributeValidationException

public AttributeValidationException getInnerAttributeValidationException()
Gets the AttributeValidationException that caused the current FieldInfoValidationException to be raised.

Returns:
AttributeValidationException The inner exceptio of the current exception

setInnerAttributeOutOfRangeException

public void setInnerAttributeOutOfRangeException(AttributeOutOfRangeException e)
Sets the AttributeOutOfRangeException that caused the current FieldInfoValidationException to be raised.

Parameters:
e - The inner exceptio of the current exception

getInnerAttributeOutOfRangeException

public AttributeOutOfRangeException getInnerAttributeOutOfRangeException()
Gets the AttributeOutOfRangeException that caused the current FieldInfoValidationException to be raised.

Returns:
AttributeOutOfRangeException The inner exceptio of the current exception