KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > jmi > javamodel > ClassDefinition


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.jmi.javamodel;
21
22 /**
23  * ClassDefinition object instance interface.
24  * Root class for feature containers - classes, interfaces, enums, annotation
25  * types. This class is not abstract since its instances are used to represent
26  * annonymous classes.
27  *
28  * <p><em><strong>Note:</strong> This type should not be subclassed or implemented
29  * by clients. It is generated from a MOF metamodel and automatically implemented
30  * by MDR (see <a HREF="http://mdr.netbeans.org/">mdr.netbeans.org</a>).</em></p>
31  */

32 public interface ClassDefinition extends org.netbeans.jmi.javamodel.Type, org.netbeans.jmi.javamodel.Element {
33     /**
34      * Returns field defined by this class (or its supertypes if includeSupertypes
35      * parameter is set to true) that matches the name provided.
36      * @param name Name of the field to be returned.
37      * @param includeSupertypes Indicates whether this operation should look for
38      * the element in superclasses.
39      * @return Returns field defined by this class (or its supertypes if includeSupertypes
40      * parameter is set to true) that matches the name provided.
41      */

42     public org.netbeans.jmi.javamodel.Field getField(java.lang.String JavaDoc name, boolean includeSupertypes);
43     /**
44      * Returns method defined by this class (or its supertypes if includeSupertypes
45      * parameter is set to true) that matches the provided signature.
46      * @param name Name of the method to be returned.
47      * @param parameters List of parameter types of the method to be returned.
48      * @param includeSupertypes Indicates whether this operation should look for
49      * the element in superclasses.
50      * @return Returns method defined by this class (or its supertypes if includeSupertypes
51      * parameter is set to true) that matches the provided signature.
52      */

53     public org.netbeans.jmi.javamodel.Method getMethod(java.lang.String JavaDoc name, java.util.List JavaDoc/*<org.netbeans.jmi.javamodel.Type>*/ parameters, boolean includeSupertypes);
54     /**
55      * Returns innerclass defined by this class (or its supertypes if includeSupertypes
56      * parameter is set to true) that matches the provided simple name.
57      * @param simpleName Simple name of the class to be returned.
58      * @param includeSupertypes Indicates whether this operation should look for
59      * the element in superclasses.
60      * @return Returns innerclass defined by this class (or its supertypes if
61      * includeSupertypes parameter is set to true) that matches the provided simple
62      * name.
63      */

64     public org.netbeans.jmi.javamodel.JavaClass getInnerClass(java.lang.String JavaDoc simpleName, boolean includeSupertypes);
65     /**
66      * Returns constructor that matches a given set of parameter types. Searches
67      * in super types if desired.
68      * @param parameters List of parameter types.
69      * @param includeSupertypes Indicates whether this operation should look for
70      * the constructor also in superclasses.
71      * @return Returns constructor that matches a given set of parameter types.
72      * Searches in super types if desired.
73      */

74     public org.netbeans.jmi.javamodel.Constructor getConstructor(java.util.List JavaDoc/*<org.netbeans.jmi.javamodel.Type>*/ parameters, boolean includeSupertypes);
75     /**
76      * @param javaClass
77      * @return
78      */

79     public boolean isSubTypeOf(org.netbeans.jmi.javamodel.ClassDefinition javaClass);
80     /**
81      * Returns the value of attribute contents.
82      * List of features defined in the class represented by this object.
83      * @return Value of contents attribute. Element type: {@link org.netbeans.jmi.javamodel.ClassMember}
84      */

85     public java.util.List JavaDoc/*<org.netbeans.jmi.javamodel.ClassMember>*/ getContents();
86     /**
87      * Returns the value of attribute superClassName.
88      * @return Value of attribute superClassName.
89      */

90     public org.netbeans.jmi.javamodel.MultipartId getSuperClassName();
91     /**
92      * Sets the value of superClassName attribute. See {@link #getSuperClassName}
93      * for description on the attribute.
94      * @param newValue New value to be set.
95      */

96     public void setSuperClassName(org.netbeans.jmi.javamodel.MultipartId newValue);
97     /**
98      * Returns the value of attribute interfaceNames.
99      * @return Value of interfaceNames attribute. Element type: {@link org.netbeans.jmi.javamodel.MultipartId}
100      */

101     public java.util.List JavaDoc/*<org.netbeans.jmi.javamodel.MultipartId>*/ getInterfaceNames();
102     /**
103      * Returns the value of attribute features.
104      * @return Value of features attribute. Element type: {@link org.netbeans.jmi.javamodel.Feature}
105      */

106     public java.util.List JavaDoc/*<org.netbeans.jmi.javamodel.Feature>*/ getFeatures();
107     /**
108      * Returns the value of reference interfaces.
109      * Interfaces that a given class (or interface) implements (or extends).
110      * @return Value of reference interfaces. Element type: {@link org.netbeans.jmi.javamodel.JavaClass}
111      */

112     public java.util.List JavaDoc/*<org.netbeans.jmi.javamodel.JavaClass>*/ getInterfaces();
113     /**
114      * Returns the value of reference superClass.
115      * Navigates to the super class of a given class. Interfaces have no superclass.
116      * All the extended interfaces are associated with an interface using Implements
117      * association.
118      * @return Value of reference superClass.
119      */

120     public org.netbeans.jmi.javamodel.JavaClass getSuperClass();
121     /**
122      * Sets the value of reference superClass. See {@link #getSuperClass} for
123      * description on the reference.
124      * @param newValue New value to be set.
125      */

126     public void setSuperClass(org.netbeans.jmi.javamodel.JavaClass newValue);
127 }
128
Popular Tags