org.jdom
Class IllegalAddException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--java.lang.IllegalArgumentException
                          |
                          +--org.jdom.IllegalAddException

public class IllegalAddException
extends IllegalArgumentException

IllegalAddException is thrown when an Element or Attribute is added to a JDOM construct illegally..

Author:
Brett McLaughlin
Version: 1.0

Constructor Summary
IllegalAddException(Element base, Attribute added, String reason)
           This will create an Exception indicating that the addition of the Attribute supplied to the Element supplied is illegal.
IllegalAddException(Element base, Element added, String reason)
           This will create an Exception indicating that the addition of the Element supplied as a child of the supplied parent is not allowed.
IllegalAddException(Document base, Element added, String reason)
           This will create an Exception indicating that the addition of the Element supplied as a child of the document is not allowed.
IllegalAddException(Element base, ProcessingInstruction added, String reason)
           This will create an Exception indicating that the addition of the ProcessingInstruction supplied as content to the supplied element is not allowed.
IllegalAddException(Document base, ProcessingInstruction added, String reason)
           This will create an Exception indicating that the addition of the ProcessingInstruction supplied as content to the supplied document is not allowed.
IllegalAddException(Element base, Comment added, String reason)
           This will create an Exception indicating that the addition of the Comment supplied as content to the supplied element is not allowed.
IllegalAddException(Document base, Comment added, String reason)
           This will create an Exception indicating that the addition of the Comment supplied as content to the supplied document is not allowed.
IllegalAddException(Element base, Entity added, String reason)
           This will create an Exception indicating that the addition of the Entity supplied as content to the supplied element is not allowed.
IllegalAddException(String reason)
           This will create an Exception with the specified error message.

Methods inherited from class java.lang.Throwable
getMessage, getLocalizedMessage, toString, printStackTrace, printStackTrace, printStackTrace, fillInStackTrace

Methods inherited from class java.lang.Object
getClass, hashCode, equals, notify, notifyAll, wait, wait, wait

Constructor Detail

IllegalAddException

public IllegalAddException(Element base, Attribute added, String reason)

This will create an Exception indicating that the addition of the Attribute supplied to the Element supplied is illegal.

Parameters:
base - Element that Attribute couldn't be added to
added - Attribute that could not be added
reason - cause for the problem

IllegalAddException

public IllegalAddException(Element base, Element added, String reason)

This will create an Exception indicating that the addition of the Element supplied as a child of the supplied parent is not allowed.

Parameters:
base - Element that the child couldn't be added to
added - Element that could not be added
reason - cause for the problem

IllegalAddException

public IllegalAddException(Document base, Element added, String reason)

This will create an Exception indicating that the addition of the Element supplied as a child of the document is not allowed.


IllegalAddException

public IllegalAddException(Element base, ProcessingInstruction added, String reason)

This will create an Exception indicating that the addition of the ProcessingInstruction supplied as content to the supplied element is not allowed.

Parameters:
base - element that the PI couldn't be added to
added - PI that could not be added
reason - cause for the problem

IllegalAddException

public IllegalAddException(Document base, ProcessingInstruction added, String reason)

This will create an Exception indicating that the addition of the ProcessingInstruction supplied as content to the supplied document is not allowed.

Parameters:
base - document that the PI couldn't be added to
added - PI that could not be added
reason - cause for the problem

IllegalAddException

public IllegalAddException(Element base, Comment added, String reason)

This will create an Exception indicating that the addition of the Comment supplied as content to the supplied element is not allowed.

Parameters:
base - element that the comment couldn't be added to
added - comment that could not be added
reason - cause for the problem

IllegalAddException

public IllegalAddException(Document base, Comment added, String reason)

This will create an Exception indicating that the addition of the Comment supplied as content to the supplied document is not allowed.

Parameters:
base - document that the PI couldn't be added to
added - PI that could not be added
reason - cause for the problem

IllegalAddException

public IllegalAddException(Element base, Entity added, String reason)

This will create an Exception indicating that the addition of the Entity supplied as content to the supplied element is not allowed.

Parameters:
base - element that the entity couldn't be added to
added - entity that could not be added
reason - cause for the problem

IllegalAddException

public IllegalAddException(String reason)

This will create an Exception with the specified error message.