ecologylab.xml
Class XMLTranslationException
java.lang.Object
java.lang.Throwable
java.lang.Exception
ecologylab.xml.XMLTranslationException
- All Implemented Interfaces:
- XMLTranslationExceptionTypes, java.io.Serializable
public class XMLTranslationException
- extends java.lang.Exception
- implements XMLTranslationExceptionTypes
There are certain rules one has to follow while using this framework for
translation from Java to XML and back. This exception class enforces those
rules on the user. So, if the user fails to follow any of the rule, this
exception is thrown with appropriate error message encapsulated in it. This
exception is thrown in the following conditions:
- If the user is translating a class which has some Collection type object
in it (e.g Vector, Hashtable)and the class does not overrides the methods
getCollection() and addElement() inherited from
ElementState.
- If the user is translating a class which has some Collection type object
in it and the collection does not contain items of objects derived from
ElementState type.
- The classes to be translated does not provide a constructor with zero
arguments. In this case the exception is thrown only when the user is
building Java classes from xml.
- The class to be translated does not provide setter method for setting
the values of the primitive type variables which are translated. In this case
the exception is thrown only when the user is building Java classes from xml.
- Version:
- 0.5
- Author:
- Andruid Kerne, Madhur Khandelwal
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
XMLTranslationException
public XMLTranslationException()
XMLTranslationException
public XMLTranslationException(java.lang.String msg)
XMLTranslationException
public XMLTranslationException(java.lang.String msg,
java.lang.Exception e)
XMLTranslationException
public XMLTranslationException(int exceptionType)
XMLTranslationException
public XMLTranslationException(java.lang.String msg,
int exceptionType)
XMLTranslationException
public XMLTranslationException(java.lang.String msg,
java.lang.Exception e,
int exceptionType)
getExceptionType
public int getExceptionType()
- Returns the type of exception that generated the XmlTranslationException.
These can be referenced from the interface XmlTranslationExceptionTypes.
- Returns:
printTraceOrMessage
public void printTraceOrMessage(Debug that,
java.lang.String msg,
ParsedURL purl)