KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > text > edits > MalformedTreeException


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.text.edits;
12
13 /**
14  * Thrown to indicate that an edit got added to a parent edit
15  * but the child edit somehow conflicts with the parent or
16  * one of it siblings.
17  * <p>
18  * This class is not intended to be serialized.
19  * </p>
20  *
21  * @see TextEdit#addChild(TextEdit)
22  * @see TextEdit#addChildren(TextEdit[])
23  *
24  * @since 3.0
25  */

26 public class MalformedTreeException extends RuntimeException JavaDoc {
27
28     // Not intended to be serialized
29
private static final long serialVersionUID= 1L;
30
31     private TextEdit fParent;
32     private TextEdit fChild;
33
34     /**
35      * Constructs a new malformed tree exception.
36      *
37      * @param parent the parent edit
38      * @param child the child edit
39      * @param message the detail message
40      */

41     public MalformedTreeException(TextEdit parent, TextEdit child, String JavaDoc message) {
42         super(message);
43         fParent= parent;
44         fChild= child;
45     }
46
47     /**
48      * Returns the parent edit that caused the exception.
49      *
50      * @return the parent edit
51      */

52     public TextEdit getParent() {
53         return fParent;
54     }
55
56     /**
57      * Returns the child edit that caused the exception.
58      *
59      * @return the child edit
60      */

61     public TextEdit getChild() {
62         return fChild;
63     }
64
65     void setParent(TextEdit parent) {
66         fParent= parent;
67     }
68 }
69
Popular Tags