KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > polyglot > types > ReferenceType


1 package polyglot.types;
2
3 import java.util.List JavaDoc;
4
5 /**
6  * A <code>ReferenceType</code> represents a reference type: a type which
7  * contains methods and fields and which is a subtype of Object.
8  */

9 public interface ReferenceType extends Type
10 {
11     /**
12      * Return the type's super type.
13      */

14     Type superType();
15
16     /**
17      * Return the type's interfaces.
18      * @return A list of <code>Type</code>.
19      * @see polyglot.types.Type
20      */

21     List JavaDoc interfaces();
22
23     /**
24      * Return the type's fields.
25      * @return A list of <code>FieldInstance</code>.
26      * @see polyglot.types.FieldInstance
27      */

28     List JavaDoc fields();
29
30     /**
31      * Return the type's methods.
32      * @return A list of <code>MethodInstance</code>.
33      * @see polyglot.types.MethodInstance
34      */

35     List JavaDoc methods();
36
37     /**
38      * Return the field named <code>name</code>, or null.
39      */

40     FieldInstance fieldNamed(String JavaDoc name);
41
42     /**
43      * Return the methods named <code>name</code>, if any.
44      * @param name Name of the method to search for.
45      * @return A list of <code>MethodInstance</code>.
46      * @see polyglot.types.MethodInstance
47      */

48     List JavaDoc methodsNamed(String JavaDoc name);
49
50     /**
51      * Return the methods named <code>name</code> with the given formal
52      * parameter types, if any.
53      * @param name Name of the method to search for.
54      * @param argTypes A list of <code>Type</code>.
55      * @return A list of <code>MethodInstance</code>.
56      * @see polyglot.types.Type
57      * @see polyglot.types.MethodInstance
58      */

59     List JavaDoc methods(String JavaDoc name, List JavaDoc argTypes);
60
61     /**
62      * Return the true if the type has the given method.
63      */

64     boolean hasMethod(MethodInstance mi);
65
66     /**
67      * Return the true if the type has the given method.
68      */

69     boolean hasMethodImpl(MethodInstance mi);
70 }
71
Popular Tags