KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > openide > src > nodes > ElementNodeFactory


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.openide.src.nodes;
21
22 import org.openide.nodes.Node;
23 import org.openide.src.*;
24
25 /** A factory used to create
26 * instances of hierarchy node implementations.
27 * Loaders that use the element hierarchy
28 * should implement this factory
29 * so as to provide their own implementations of hierarchy element nodes.
30 * @see ClassChildren
31 * @see SourceChildren
32 *
33 * @author Dafe Simonek, Jaroslav Tulach
34 */

35 public interface ElementNodeFactory {
36
37     /** Make a node representing a constructor.
38     * @param element the constructor
39     * @return a constructor node instance
40     */

41     public Node createConstructorNode (ConstructorElement element);
42
43     /** Make a node representing a method.
44     * @param element the method
45     * @return a method node instance
46     */

47     public Node createMethodNode (MethodElement element);
48
49     /** Make a node representing a field.
50     * @param element the field
51     * @return a field node instance
52     */

53     public Node createFieldNode (FieldElement element);
54
55     /** Make a node representing an initializer.
56     * @param element the initializer
57     * @return an initializer node instance
58     */

59     public Node createInitializerNode (InitializerElement element);
60
61     /** Make a node representing a class.
62     * @param element the class
63     * @return a class node instance
64     */

65     public Node createClassNode (ClassElement element);
66
67     /** Make a node indicating that the creation of children
68     * is still under way.
69     * It should be used when the process is slow.
70     * @return a wait node
71     */

72     public Node createWaitNode ();
73
74     /** Make a node indicating that there was an error creating
75     * the element children.
76     * @return the error node
77     */

78     public Node createErrorNode ();
79
80 }
81
Popular Tags