KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > java > ui > nodes > SourceNodeFactory


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.netbeans.modules.java.ui.nodes;
21
22 import org.openide.nodes.Node;
23 import org.netbeans.jmi.javamodel.*;
24
25 /** A factory used to create
26 * instances of hierarchy node implementations.
27 * Modules that use the JMI objects
28 * should implement this factory
29 * so as to provide their own implementations of hierarchy JMI object nodes.
30 * see ClassChildren
31 * see SourceChildren
32 *
33 * @author Jan Pokorsky
34 */

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

41     public Node createConstructorNode(Constructor 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(Method 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(Field 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(Initializer 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(JavaClass element);
66
67     /** Make a node representing an enumeration.
68     * @param element the enumeration
69     * @return a enumeration node instance
70     */

71     public Node createEnumNode(JavaEnum element);
72
73     /** Make a node representing an enumeration constant.
74     * @param element the enumeration constant
75     * @return a enumeration constant node instance
76     */

77     public Node createEnumConstantNode(EnumConstant element);
78
79     /** Make a node representing an annotation type.
80     * @param element the annotation type
81     * @return a annotation type node instance
82     */

83     public Node createAnnotationTypeNode(AnnotationType element);
84
85     /** Make a node representing an annotation type member.
86     * @param element the annotation type member
87     * @return a annotation type node instance
88     */

89     public Node createAnnotationTypeMethodNode(Attribute element);
90     
91     /** Make a node indicating that the creation of children
92     * is still under way.
93     * It should be used when the process is slow.
94     * @return a wait node
95     */

96     public Node createWaitNode();
97
98     /** Make a node indicating that there was an error creating
99     * the element children.
100     * @return the error node
101     */

102     public Node createErrorNode();
103
104 }
105
Popular Tags