KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > lang > model > type > ExecutableType


1 /*
2  * @(#)ExecutableType.java 1.4 06/07/31
3  *
4  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package javax.lang.model.type;
9
10
11 import java.util.List JavaDoc;
12
13 import javax.lang.model.element.ExecutableElement;
14
15
16 /**
17  * Represents the type of an executable. An <i>executable</i>
18  * is a method, constructor, or initializer.
19  *
20  * <p> The executable is
21  * represented as when viewed as a method (or constructor or
22  * initializer) of some reference type.
23  * If that reference type is parameterized, then its actual
24  * type arguments are substituted into any types returned by the methods of
25  * this interface.
26  *
27  * @author Joseph D. Darcy
28  * @author Scott Seligman
29  * @author Peter von der Ah&eacute;
30  * @version 1.4 06/07/31
31  * @see ExecutableElement
32  * @since 1.6
33  */

34 public interface ExecutableType extends TypeMirror {
35
36     /**
37      * Returns the type variables declared by the formal type parameters
38      * of this executable.
39      *
40      * @return the type variables declared by the formal type parameters,
41      * or an empty list if there are none
42      */

43     List JavaDoc<? extends TypeVariable> getTypeVariables();
44
45     /**
46      * Returns the return type of this executable.
47      * Returns a {@link NoType} with kind {@link TypeKind#VOID VOID}
48      * if this executable is not a method, or is a method that does not
49      * return a value.
50      *
51      * @return the return type of this executable
52      */

53     TypeMirror getReturnType();
54
55     /**
56      * Returns the types of this executable's formal parameters.
57      *
58      * @return the types of this executable's formal parameters,
59      * or an empty list if there are none
60      */

61     List JavaDoc<? extends TypeMirror> getParameterTypes();
62
63     /**
64      * Returns the exceptions and other throwables listed in this
65      * executable's {@code throws} clause.
66      *
67      * @return the exceptions and other throwables listed in this
68      * executable's {@code throws} clause,
69      * or an empty list if there are none.
70      */

71     List JavaDoc<? extends TypeMirror> getThrownTypes();
72 }
73
Popular Tags