|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjef.dna.util.ValidationExceptionHelper
public class ValidationExceptionHelper
This helper class is available starting from every ValidationExceptionAncestor
instance, and is meant for abstracting the developer from all the reflection releted programming
issues necessary for dealing with such exception instances.
Constructor Summary | |
---|---|
ValidationExceptionHelper()
Creates a new instance of ValidationExceptionHelper |
Method Summary | ||
---|---|---|
|
correctAttribute(T param)
Replaces the value of the attribute over which the validation process failed with the expected right one passed as parameter. |
|
|
getActualValue(T param)
This method returns the actual value of the parameter over which the validation process failed. |
|
void |
setException(ValidationExceptionAncestor e)
Sets the ValidationExceptionAncestor subclass handled by the current
ValidationExceptionHelper . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ValidationExceptionHelper()
Method Detail |
---|
public void setException(ValidationExceptionAncestor e)
ValidationExceptionAncestor
subclass handled by the current
ValidationExceptionHelper
.
e
- The exception to be handledpublic <T> void correctAttribute(T param)
param
- The actual parameter which can be either a primitive or reference typepublic <T> T getActualValue(T param)
param
- A variable of the same type (either primitive or reference) of the one we are
requesting the actual value
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |