KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > polyglot > types > ProcedureInstance


1 package polyglot.types;
2
3 import java.util.List JavaDoc;
4
5 /**
6  * A <code>ProcedureInstance</code> contains the type information for a Java
7  * procedure (either a method or a constructor).
8  */

9 public interface ProcedureInstance extends CodeInstance
10 {
11     /**
12      * List of formal parameter types.
13      * @return A list of <code>Type</code>.
14      * @see polyglot.types.Type
15      */

16     List JavaDoc formalTypes();
17
18     /**
19      * List of declared exception types thrown.
20      * @return A list of <code>Type</code>.
21      * @see polyglot.types.Type
22      */

23     List JavaDoc throwTypes();
24
25     /**
26      * Returns a String representing the signature of the procedure.
27      * This includes just the name of the method (or name of the class, if
28      * it is a constructor), and the argument types.
29      */

30     String JavaDoc signature();
31
32     /**
33      * Returns either "method" or "constructor".
34      */

35     String JavaDoc designator();
36
37     /**
38      * Return true if <code>this</code> is more specific than <code>pi</code>
39      * in terms of method overloading.
40      */

41     boolean moreSpecific(ProcedureInstance pi);
42
43     /**
44      * Returns true if the procedure has the given arguments.
45      */

46     boolean hasFormals(List JavaDoc arguments);
47
48     /**
49      * Returns true if the procedure throws a subset of the exceptions
50      * thrown by <code>pi</code>.
51      */

52     boolean throwsSubset(ProcedureInstance pi);
53
54     /**
55      * Returns true if the procedure can be called with the given arguments.
56      */

57     boolean callValid(List JavaDoc actualTypes);
58
59     /**
60      * Return true if <code>this</code> is more specific than <code>pi</code>
61      * in terms of method overloading.
62      */

63     boolean moreSpecificImpl(ProcedureInstance pi);
64
65     /**
66      * Returns true if the procedure has the given arguments.
67      */

68     boolean hasFormalsImpl(List JavaDoc arguments);
69
70     /**
71      * Returns true if the procedure throws a subset of the exceptions
72      * thrown by <code>pi</code>.
73      */

74     boolean throwsSubsetImpl(ProcedureInstance pi);
75
76     /**
77      * Returns true if the procedure can be called with the given arguments.
78      */

79     boolean callValidImpl(List JavaDoc actualTypes);
80 }
81
Popular Tags