jef.dna.attributes.exceptions
Class AttributeValidationException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by jef.dna.exceptions.ValidationExceptionAncestor
              extended by jef.dna.attributes.exceptions.AttributeValidationException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ExceptionTableEntryValidationException, InnerClassesTableEntryValidationException, LineNumberTableEntryValidationException, LocalVariableTableEntryValidationException

public class AttributeValidationException
extends ValidationExceptionAncestor

This exception is thrown whenever a validation process over a Attribute fails. Should the attribute be "ExceptionTable", the actualValue will represent the index within the ExceptionTable of the ExceptionTableEntry whose validation failed. Should the attribute be "Classes", the actualValue will represent the index within the InnerClassesTable of the InnerClassesTableEntry whose validation failed. Should the attribute be "LineNumberTable", the actualValue will represent the index within the LineNumberTable of the LineNumberTableEntry whose validation failed. Should the attribute be "LocalVariableTable", the actualValue will represent the index within the LocalVariableTable of the LocalVariableTableEntry whose validation failed.

Author:
Giovanni Giovanzana
See Also:
Serialized Form

Field Summary
 
Fields inherited from class jef.dna.exceptions.ValidationExceptionAncestor
actualValue, attribute, expectedValue, innerIore, msg, srcEntity
 
Constructor Summary
AttributeValidationException(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 ConstantInfoValidationException.
 
Method Summary
 java.lang.Object getExpectedValue()
          Returns the expected value associated with the attribute over which the validation process failed.
 InnerClassesTableEntryValidationException getInnerClassesTblValidExc()
          Gets the InnerClassesTableEntryValidationException stored within the current AttributeValidationException.
 LineNumberTableEntryValidationException getLineNumberTblValidExc()
          Gets the LineNumberTableEntryValidationException stored within the current AttributeValidationException.
 LocalVariableTableEntryValidationException getLocalVariableTblEntryValidExc()
          Gets the LocalVariableTableEntryValidationException stored within the current AttributeValidationException.
 boolean hasExcpTableValidException()
          Test whether the current AttributeValidationException stores an ExceptionTableEntryValidationException
 boolean hasInnerClassesTableEntryValidException()
          Test whether the current AttributeValidationException stores an InnerClassesTableEntryValidationException
 boolean hasLineNumberTableEntryValidException()
          Test whether the current AttributeValidationException stores an LineNumeberTableEntryValidationException
 boolean hasLocalVariableTableEntryValidException()
          Test whether the current AttributeValidationException stores an LocalVariableTableEntryValidationException
 ExceptionTableEntryValidationException setExceptionTblValidExc()
          Gets the ExceptionTableValidationException stored within the current AttributeValidationException.
 void setExceptionTblValidExc(ExceptionTableEntryValidationException e)
          Sets the ExceptionTableValidationException stored within the current AttributeValidationException.
 void setInnerClassesTblValidExc(InnerClassesTableEntryValidationException e)
          Sets the InnerClassesTableEntryValidationException stored within the current AttributeValidationException.
 void setLineNumberTblValidExc(LineNumberTableEntryValidationException e)
          Sets the LineNumberTableEntryValidationException stored within the current AttributeValidationException.
 void setLocalVariableTblValidExc(LocalVariableTableEntryValidationException e)
          Sets the LocalVariableTableEntryValidationException stored within the current AttributeValidationException.
 
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

AttributeValidationException

public AttributeValidationException(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 ConstantInfoValidationException.

Parameters:
srcEntity - The source of the exception
attribute - The attribute of the Attribute over which the validation failed
actualValue - The actual value of the above attribute
expectedValue - The expected value of the above attribute
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

setExceptionTblValidExc

public void setExceptionTblValidExc(ExceptionTableEntryValidationException e)
Sets the ExceptionTableValidationException stored within the current AttributeValidationException. Such an exception exists iff the method hasExcpTableValidException returns true

Parameters:
e -

setExceptionTblValidExc

public ExceptionTableEntryValidationException setExceptionTblValidExc()
Gets the ExceptionTableValidationException stored within the current AttributeValidationException. Such an exception exists iff the method hasExcpTableValidException returns true

Returns:
ExceptionTableEntryValidationException

hasExcpTableValidException

public boolean hasExcpTableValidException()
Test whether the current AttributeValidationException stores an ExceptionTableEntryValidationException

Returns:
boolean

setInnerClassesTblValidExc

public void setInnerClassesTblValidExc(InnerClassesTableEntryValidationException e)
Sets the InnerClassesTableEntryValidationException stored within the current AttributeValidationException. Such an exception exists iff the method hasInnerClassesTableEntryValidException returns true

Parameters:
e -

getInnerClassesTblValidExc

public InnerClassesTableEntryValidationException getInnerClassesTblValidExc()
Gets the InnerClassesTableEntryValidationException stored within the current AttributeValidationException. Such an exception exists iff the method hasInnerClassesTableEntryValidException returns true

Returns:
InnerClassesTableEntryValidationException

hasInnerClassesTableEntryValidException

public boolean hasInnerClassesTableEntryValidException()
Test whether the current AttributeValidationException stores an InnerClassesTableEntryValidationException

Returns:
boolean

setLineNumberTblValidExc

public void setLineNumberTblValidExc(LineNumberTableEntryValidationException e)
Sets the LineNumberTableEntryValidationException stored within the current AttributeValidationException. Such an exception exists iff the method hasLineNumberTableEntryValidException returns true

Parameters:
e -

getLineNumberTblValidExc

public LineNumberTableEntryValidationException getLineNumberTblValidExc()
Gets the LineNumberTableEntryValidationException stored within the current AttributeValidationException. Such an exception exists iff the method hasLineNumberTableEntryValidException returns true

Returns:
LineNumberTableEntryValidationException

hasLineNumberTableEntryValidException

public boolean hasLineNumberTableEntryValidException()
Test whether the current AttributeValidationException stores an LineNumeberTableEntryValidationException

Returns:
boolean

setLocalVariableTblValidExc

public void setLocalVariableTblValidExc(LocalVariableTableEntryValidationException e)
Sets the LocalVariableTableEntryValidationException stored within the current AttributeValidationException. Such an exception exists iff the method hasLocalVarTableEntryValidException returns true

Parameters:
e -

getLocalVariableTblEntryValidExc

public LocalVariableTableEntryValidationException getLocalVariableTblEntryValidExc()
Gets the LocalVariableTableEntryValidationException stored within the current AttributeValidationException. Such an exception exists iff the method hasLocalVarTableEntryValidException returns true

Returns:
LocalVariableTableEntryValidationException

hasLocalVariableTableEntryValidException

public boolean hasLocalVariableTableEntryValidException()
Test whether the current AttributeValidationException stores an LocalVariableTableEntryValidationException

Returns:
boolean